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. Image for the cookie policy date
close icon

Virtual Grid question . .

in a virtual grid if a user changes the value of a cell (which then fires off SaveCellInfo event) which then changes the data in my data structures do i have to add: _Grid.RefreshRange(GridRangeInfo.Row(gridRow)); to have the grid update show the value that the user typed in or not . . if that is the case wouldn''t you always have to put a refresh row or refreshcell in the SaveCellInfo function?? thks ak

5 Replies

ST stanleyj Syncfusion Team February 2, 2006 06:34 AM UTC

Hi Adam, No, that code does not update the data structure. you will have to call the Update function of the dataAdapter. Also refer this link below, find a sample on top, explicitly updating an xml file through a button handler. http://www.syncfusion.com/support/forums/message.aspx?MessageID=39566 Let me know if you have any more question. Best regards, Stanley


AD Administrator Syncfusion Team February 6, 2006 09:21 PM UTC

I dont understand your response at all. My questions is that after a user changes data in the grid (which will then call SaveCellInfo . .) and after i update my data structure off of that event . . Do i have to explicitally call RefreshRange on the grid for the view to update or does this happen automatically. thks, ak >Hi Adam, > >No, that code does not update the data structure. you will have to call the Update function of the dataAdapter. > >Also refer this link below, find a sample on top, explicitly updating an xml file through a button handler. >http://www.syncfusion.com/support/forums/message.aspx?MessageID=39566 > >Let me know if you have any more question. > >Best regards, >Stanley >


AD Administrator Syncfusion Team February 7, 2006 09:43 AM UTC

Hi Adam, You need to call the RefreshRange() method along with the ResetVolatileData() and the UpdateScrollbar() methods explicitally in order to reflect the changes in the grid, when there is a change in the datasource. The ResetVolatileData() method is used to reflect the changes to grid immediately and the UpdateScrollbar() method is used to update the scrollbar properly. Here is the code snippet. // Update the datasource this.gridControl1.ResetVolatileData(); this.gridControl1.UpdateScrollBars(); this.gridControl1.RefreshRange(GridRangeInfo.Row(this.gridControl1.RowCount )); Refer this sample for details. Let us know if you need any further assistance. Regards, Madhan


AK Adam K. February 8, 2006 03:52 AM UTC

Your response and your example say 2 different things. You say that you need to have resetrange and resetvolatiledata but in your savecellinfo event (as per my questions) you dont do either. In your example, you are only calling these events when the rows change. My quesion was when i update an existing cell in the grid (from the GUI) and the savecellinfo event fires.. do i need to explicitally call Refresh in the call stack of savecellinfo or does this happen automatically. I am not asking about when rows changes, just when 1 piece of data gets updated by the user. Please explain . . thks, ak >Hi Adam, > > You need to call the RefreshRange() method along with the ResetVolatileData() and the UpdateScrollbar() methods explicitally in order to reflect the changes in the grid, when there is a change in the datasource. The ResetVolatileData() method is used to reflect the changes to grid immediately and the UpdateScrollbar() method is used to update the scrollbar properly. Here is the code snippet. > >// Update the datasource > this.gridControl1.ResetVolatileData(); > this.gridControl1.UpdateScrollBars(); > this.gridControl1.RefreshRange(GridRangeInfo.Row(this.gridControl1.RowCount )); > >Refer this sample for details. > >Let us know if you need any further assistance. > >Regards, >Madhan


ST stanleyj Syncfusion Team February 8, 2006 09:01 AM UTC

Hi Adam, Calling Refresh explicitly in SaveCellInfo is not necessary. Best regards, Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon