views:

478

answers:

1

I am working with the Telerik Winforms Radgrid version 2009.2.9.701 in visual studio 2008 (C#) and I've come across and issue I can't seem to find a solution for.

When the radgrid is populated and the user changes a cell within a row, the row is not flagged as "modified" until the user actually clicks onto another location on the datagrid. If the user modifies any values in a row and immediately clicks the "Save" button on my winform, the row is not flagged as having been modified and is not showing up in my list of modified rows.

I am using the following code to gather the modified rows ...

DataTable modifiedRows = dataTable.GetChanges(DataRowState.Modified);

My question is as follows: Is there a way to mark a row as "Modified" when the user changes a value in ANY cell in the row, without the user having to click off of the row before clicking the save button. I can't seem to find the flag that marks a data row as "Modified".

Thank you for your help, it is much appreciated.

+1  A: 

This might be a bit of a work around but can you make the Save button move the focus off the grid when clicked? This may cause the grid row to be marked Modified.

    private void SaveButton_Click(object sender, EventArgs e)
    {
         SaveButton.Focus();
         // Do work to save the grid's modified rows
    }
AverageAdam