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.

Edit Cell and Sort bug (v 2.1.0.9)

Thread ID:

Created:

Updated:

Platform:

Replies:

58222 Mar 20,2007 05:58 PM Mar 29,2007 10:32 PM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 20, 2007 05:58 PM

Hi,

There is a bug in the sorting feature of the grid. Grid displays the incorrect data in the following scenario:

1. Sort a column (int type) by clicking the column header.
2. Enter a value in the cell in the sorted column such that the column is no longer sorted.
3. Sort the column again.

You can see the entered value appearing twice in the grid.

How to resolve this issue. Please provide the solution.

Thanks,
Amiya

Administrator [Syncfusion]
Replied On March 21, 2007 06:17 PM

Hi Amiya,

You can handle CurrentCellMoved event and ending the edit on the binder forces the cached value to be cleared and makes the undo ''stick.''. Maybe something like this will work for you.

private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
if(this.gridDataBoundGrid1.Binder.IsEditing)
this.gridDataBoundGrid1.Binder.EndEdit();
}


Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 21, 2007 07:07 PM

Hi Haneef,

Its updating the wrong row. Please help.

Thanks,
Amiya

Administrator [Syncfusion]
Replied On March 22, 2007 06:32 PM

Hi Amiya,

Before calling the Binder.EndEdit mehod, you need to call the CurrentCell.EndEdit method in the CurrentCellMoving event. Please try this and let me know if this helps.

[c#]
this.grid.CurrentCell.EndEdit(); //saves the currentcell
this.grid.Binder.EndEdit(); //removes the pencil

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 23, 2007 09:38 AM

Haneef,

Even this does not work. Anyways, I figured out a way to do it by updating the datasource in currentcellvalidating event handler.

Thanks,
Amiya

Amiya
Replied On March 29, 2007 10:32 PM

Haneef,

An update on this. Updating the datasource and binding to grid again in currentcellvalidating event works only if the user edits the cell and press the return key to end the edit. If he click on any other cell to end the editing of the current cell then the above solution doesn't work.

I'm surprised over this behavior 'coz ultimately by clicking on any other cell or pressing the return key you are ending the edit!

How do I resolve this problem?

Thanks,
Amiya

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.

;