简体   繁体   中英

Gridview Column width changing

I have a gridview whose datasource is an oracle database. I want to know how to be able to change column width (in the gridview) when it is being displayed in the web browser.

Thank you

You can set the column directly with the GridView tag:

<asp:GridView ID="myGrid" runat="server">
  <Columns>
    <asp:BoundField DataField="myColumn" ControlStyle-Width="25%" />
  </Columns>
</asp:GridView>

You could also assign the column a CSS class, and then use CSS to set the column width.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM