Reputation: 4048
I am wondering how to get the width of a vertical scroll bar on an ASPxGridView.
Here are some more details: I am trying to size a panel to be the same width as the ASPxGridView. The grid does not have its width property set. All columns have fixed widths. If I sum up all of the column widths on the server side and apply the result to the panel then I am still off by the width of the vertical scroll bar. I can just inspect the element after its rendered and get the difference and hard code it... but I doubt that will work in all cases. Any Ideas?
Thanks in advance.
Upvotes: 1
Views: 2662
Reputation: 640
The control will have a width once it is rendered on the client side, so you can get the width of the gridview on the client side init function of the panel.
Init="function(s, e) { s.SetWidth(ASPxGridView1.GetWidth());}"
Upvotes: 0
Reputation: 823
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" ...>
<Columns>
....
</Columns>
<RowStyle Width="150px"/>
</asp:GridView>
Try this, I think it works
Upvotes: 0