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.

Virtual grid + add new row

Thread ID:

Created:

Updated:

Platform:

Replies:

40159 Jan 26,2006 01:03 PM Jan 30,2006 01:48 PM Windows Forms 5
loading
Tags: GridControl
Hui Zhong
Asked On January 26, 2006 01:03 PM

When the data source (view) behind the virtual grid is inserted a new row, I used the grid.refresh(), and want to move the current cell to the new added row: this.CurrentCell.MoveTo(GridRangeInfo.Row(newRowIndex )); the new row data was partially displayed, some column cells data are missing. And the grid did not scroll to the current cell. Please help. Thanks.

Administrator [Syncfusion]
Replied On January 26, 2006 10:33 PM

Hui, try calling grid.Model.ResetVolatileData(); grid.UpdateScrollBars(); The call to ResetVolatileData will force the grid to callback into the QueryRowCount event which you probably have overriden in your code and where you return the new row count (including the newly added row ...) Stefan >When the data source (view) behind the virtual grid is inserted a new row, I used the grid.refresh(), and want to move the current cell to the new added row: > this.CurrentCell.MoveTo(GridRangeInfo.Row(newRowIndex )); > >the new row data was partially displayed, some column cells data are missing. And the grid did not scroll to the current cell. Please help. Thanks.

Hui Zhong
Replied On January 27, 2006 03:11 PM

It doesn''t work for me. ResetVolatileData did force grid to callback into the QueryRowCount event, and the grid row count did increase by 1. But the data is still partially displayed and the scroll bar doesn''t work either. Do you have any example for this scenario? For example, how to add one row in the virtual grid, and heightlight the added row in the grid. Hui >Hui, > >try calling > > >grid.Model.ResetVolatileData(); >grid.UpdateScrollBars(); > > >The call to ResetVolatileData will force the grid to callback into the QueryRowCount event which you probably have overriden in your code and where you return the new row count (including the newly added row ...) > >Stefan > >>When the data source (view) behind the virtual grid is inserted a new row, I used the grid.refresh(), and want to move the current cell to the new added row: >> this.CurrentCell.MoveTo(GridRangeInfo.Row(newRowIndex )); >> >>the new row data was partially displayed, some column cells data are missing. And the grid did not scroll to the current cell. Please help. Thanks.

Hui Zhong
Replied On January 27, 2006 04:29 PM

Please use this attached sample code. It''s an example from your website. I added one button to add new records. click it, you will see the record was inserted, however, the scroll bar doesn''t work in this scenario. Thanks. >Hui, > >try calling > > >grid.Model.ResetVolatileData(); >grid.UpdateScrollBars(); > > >The call to ResetVolatileData will force the grid to callback into the QueryRowCount event which you probably have overriden in your code and where you return the new row count (including the newly added row ...) > >Stefan > >>When the data source (view) behind the virtual grid is inserted a new row, I used the grid.refresh(), and want to move the current cell to the new added row: >> this.CurrentCell.MoveTo(GridRangeInfo.Row(newRowIndex )); >> >>the new row data was partially displayed, some column cells data are missing. And the grid did not scroll to the current cell. Please help. Thanks.

InsertDeleteSample.zip

stanleyj [Syncfusion]
Replied On January 29, 2006 11:47 PM

Hi Hui, Here is a small sample in which, a button handler adds a new row to a virtual grid. Let me know if that does not help. Best regards, Stanley

Hui Zhong
Replied On January 30, 2006 01:48 PM

It works. Thanks. >Hi Hui, > >Here is a small sample in which, a button handler adds a new row to a virtual grid. Let me know if that does not help. > >Best regards, >Stanley

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.

;