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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with your IBindingList Sample

Thread ID:





60913 May 15,2007 11:18 AM UTC May 15,2007 05:31 PM UTC WinForms 1
Tags: GridControl
Asked On May 15, 2007 11:18 AM UTC


we have a problem with your IBindingList sample which comes with the new Syncfusion version 5.

I have attached the modified sample so you can see the issue. The problem occurs during the add new row mechanism.

So when you start the sample place the cursor in the "Add New" row and press a key. A new item is added to the list automatically via the AddNew method of the IBindingList interface. Now when you press "ESC" the item added before will be deleted via the RemoveAt method of the IList part.

Now place the cursor in a cell of the row above the "Add New" row with the mouse. And then back to the "Add New" row. Press a key and the same procedure as before occurs (A new item is added to the list via the AddNew method). Now when you press ESC nothing happens - no call of RemoveAt. And this is the problem. So the list grows internally but the grid displays only some items.

Why is RemoveAt only called in the first time? Any ideas?



haneefm [Syncfusion]
Replied On May 15, 2007 05:31 PM UTC

Hi Markus,

You can handle the TableControlCurrentCellKeydown event and call RemoveAt method to remove the record at specified position in a list. Below is a code snippet

void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
if (e.Inner.KeyData == Keys.Escape)
Element el = e.TableControl.Table.CurrentElement;
if (el is GridAddNewRecord)
e.Inner.Handled = true;
DataCollection a = this.gridGroupingControl1.DataSource as DataCollection;
a.RemoveAt(a.Count -1);

Best regards,


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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