We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Auto fit cols and rows . .

Thread ID:

Created:

Updated:

Platform:

Replies:

33556 Aug 22,2005 08:39 PM Aug 23,2005 09:15 AM Windows Forms 5
loading
Tags: GridControl
Adam K.
Asked On August 22, 2005 08:39 PM

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

Administrator [Syncfusion]
Replied On August 22, 2005 08:43 PM

Try: beginupdate ColWidths.ResizeToFit endupdate refresh

Adam K.
Replied On August 22, 2005 08:57 PM

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

Administrator [Syncfusion]
Replied On August 23, 2005 03:04 AM

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.

Adam K.
Replied On August 23, 2005 07:40 AM

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

Administrator [Syncfusion]
Replied On August 23, 2005 09:15 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;