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.
Syncfusion Feedback

Virtual grid + add new row

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 27, 2006 03:33 AM UTC

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 08:11 PM UTC

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 09:29 PM UTC

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 30, 2006 04:47 AM UTC

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 06:48 PM UTC

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.

Warning Icon 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.Close Icon

;