This is a migrated thread and some comments may be shown as answers.

Triggering RowEditEnded after leaving cell to another within the w

0 Answers 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mateusz
Top achievements
Rank 1
Mateusz asked on 22 Jan 2018, 11:28 AM

Hello,

I'm having problem with editing data in my RadGridView. I have it populated with DB items, with some columns editable. After edit is done, other cells are supposed to update. And here everything is working fine, user can edit row, and then, here comes the problem, he needs to leave current ROW in order to trigger RowEditEnded event. After changing it to CellEditEnded I have alot troubles with StackOverflow errors, coz event is triggered repeatedly (and I'm not sure if it works and can't break the infinite trigger). I'm looking for solution to either:

1. Call RowEditEnded event after user is leaving edited cell and navigate to another cell within the same row

2. Handle CellEditEnded event once, just the same as I handle RowEditEnded (I expected them to work in similar way)

Here is code behind example of what I'm trying to do:

 

private void OnEditEnded_OnRowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
        {
            var grid = sender as RadGridView;
 
            if (grid != null)
            {
                var objectFromList = grid.SelectedItem as MyClass;
               
 
                if (objectFromList != null)
                {
// Whole logic here
                }
            }
           }

 

Looking forward for quick answer,

Best Regards

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Mateusz
Top achievements
Rank 1
Share this question
or