AD
Administrator
Syncfusion Team
August 23, 2005 12:43 AM UTC
Try:
beginupdate
ColWidths.ResizeToFit
endupdate
refresh
AK
Adam K.
August 23, 2005 12:57 AM UTC
i did but if a add a new row or coll during that refresh all the cols are resized except the last one that i just added. its almost like i have to call resizetofit again after refresh to get it to work with the virtual grid . . any thoughts . .
ak
>Try:
>
>beginupdate
>ColWidths.ResizeToFit
>endupdate
>refresh
AD
Administrator
Syncfusion Team
August 23, 2005 07:04 AM UTC
In a virtual grid, if you change the number of rows/columns in the virtual data source, you must call grid.ResetVolatileData to make the grid aware of your modified row/col counts. So, if you add a row, and call ResizeToFit without first calling ResetVolatileData, the grid will not be aware of the new row.
AK
Adam K.
August 23, 2005 11:40 AM UTC
calling grid.refresh() is not good enough for new rows and cols .
>how do you autofit for a virtual grid . . i am trying to use the resize to fit but it doesn''t seem to be working . .
>
>maybe a better questions is when in a
>beginupdate
>refresh
>endupdate
>
>should it be called . .
>
>thks,
>ak
AD
Administrator
Syncfusion Team
August 23, 2005 01:15 PM UTC
Can you post a sample showing this problem or tell us how to see it one of ours?
If you are providing the RowCount and ColCount exclusively through the QueryColCount and QueryRowCount, then calling Refresh (outside of a Begin/EndUpdate) should be all that is required after you have added new rows or columns to your datasource outside the grid.