how to set gridview column width in
  • how can i set column width in gridview in
  • 4 Comments sorted by
  • Vote Up0Vote Down WaqasWaqas
    172.00 Karma Accepted Answer
    hi you can set column width for gridview in aspx side like this.

    <asp:GridView runat="server">
                <asp:BoundField ControlStyle-Width="30%" DataField="FeildName1" />
                <asp:BoundField ControlStyle-Width="70%" DataField="FeildName2" />

  • If i dont have any bound field only simple colums . so

    headerstyle is the column heading name
    item style are all data
    for further details and related topics
  • so try

    GridViewName.Rows[0].Cells[0].Width = 100;

    100 here define in pixel.
  • Waqas you are right . but in wizard mode of gridview we can directly set width height and all other formating .
    for further details and related topics

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week

    Optimum Creative