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

Is it possible to not scroll grid while inserting a new record?

I have a GGC binded to a Bindinglist<T>.

If I have my vertical scroll somewhere in the middle and a new record is inserted on top of the grid, all records go down, since a new one was inserted. Any way to avoid that?

For example I have 1000 rows. The user is analysing the 500th row (somewhere in the middle) and 300 more rows are added to the top.
That specific row (500th) will not be in view anymore since those 300 were added.

3 Replies

VK Vinish Kumar K Syncfusion Team March 28, 2013 12:20 PM UTC

Hi Pedro Camilo Amantea,

 

Thank you for your interest in Syncfusion products.

You can achieve the behavior by using the “SetTopRow()” function.

I have used the following code in the sample that you provided and this achieves the desired behavior:

this.gridGroupingControl1.BeginUpdate();      

dataSource.Insert(0, new Data(r.ToString(), "Category" + r.ToString(), "Desc" + r.ToString()));

this.gridGroupingControl1.TableControl.SetTopRow(gridGroupingControl1.TableControl.TopRowIndex + 1);

this.gridGroupingControl1.TableControl.CurrentCell.MoveUp();

this.gridGroupingControl1.EndUpdate(true);

Please refer to the attached sample for more details.

 

http://www.syncfusion.com/downloads/Support/DirectTrac/103946/Adding_Rows1756248693.zip

 

Please let me know if you have any further concerns.

 

Regards,

Vinish.



PC Pedro Camilo Amantea April 2, 2013 11:55 AM UTC

that's exactly what I was looking for.
Thank you


VK Vinish Kumar K Syncfusion Team April 3, 2013 03:39 AM UTC

Hi Pedro,

We are glad to know that your issue has been fixed. Please open a new support forum / incident in your Direct-Trac account. if you have any other concerns if you want us to follow up with this issue ,we will be happy to assist you.

Thanks for using Syncfusion Products.

Regards,

Vinish


Loader.
Live Chat Icon For mobile
Up arrow icon