Resizing of grid width on resizing of window width not work


I need to show the grid size according to the window resolution. So I had set the width of the columns in the grid in %.
And I had used the same code as mention in the below url. … .html#code

But when I am incresing or decreasing the window size, grid size remain same.
Only first time It come fine according to the window size.

I am also putting how the code I had used.
Div I had defined as -

This button I am using to bind the Grid->
<asp:Button ID=“Button1” runat=“server” Text=“Button” OnClientClick=“javascript:BindTheDhtmlXGrid();return false;” />

the javascript Code is here->

Head tag having this code…all css and js is available
But still it is not working for me.

Do , Still I am missing some thing.


Lokendra Ujjwal

You’ll probably find the parent container of the grid div is set to a fixed width. Use the Developer toolbar in IE, Inspect Element in Chrome or Firebug in Firefox to discover the widths of your page elements.

The div is directly in the Form Tag.

I had Used -
dhtmlxEvent(window, “resize”, function () { mygrid.setSizes(); });

before mygrid.init();

Now , it is working for me.

If this resize method that i had used now is necessary for to resize the grid, then This code was not present in the sample provide for resizing the grid on window resize. … .html#code

And One more thing if I had put mygrid.enableAutoWidth(true);, then also resizing don’t work

Lokendra Kumar Ujjwal