I have a WPF radGridView populated with data. There are 3 columns - "ID", "FirstName", and "LastName" for simplicity.
"ID" is a hidden column. It's only there so I can reference the ID in code behind.
So the Grid is displaying FirstName and LastName. In the interface, I have code-behind on the CellEditEnded event which is supposed to update the database with any changes in data. The code is archaic still and I know there are validity checks that have to be added, etc., but my problem is I cannot obtain the ID of the row I'm in. In this event, e is of type Telerik.Windows.Controls.GridViewCellEditEndedEventArgs
I'm trying to use e.Cell.ParentRow.Cells(0).ToString but that returns the value of the first visible cell. Moreover, I don't want to use Cells(0), I'd rather use the cell name in case the index value changes - but this only takes index values. I've tried going back to the grid itself using something like uxGRIDNAME.row(0)... etc but there doesn't seem to be any property that I can use to go to a specific row. Moreover, "e" doesn't contain a rowindex anyway. I'm baffled that this is so difficult to figure out - it seems like something that should be so simple. I'm sure someone has some kind of insight here. Thank you in advance!
"ID" is a hidden column. It's only there so I can reference the ID in code behind.
So the Grid is displaying FirstName and LastName. In the interface, I have code-behind on the CellEditEnded event which is supposed to update the database with any changes in data. The code is archaic still and I know there are validity checks that have to be added, etc., but my problem is I cannot obtain the ID of the row I'm in. In this event, e is of type Telerik.Windows.Controls.GridViewCellEditEndedEventArgs
I'm trying to use e.Cell.ParentRow.Cells(0).ToString but that returns the value of the first visible cell. Moreover, I don't want to use Cells(0), I'd rather use the cell name in case the index value changes - but this only takes index values. I've tried going back to the grid itself using something like uxGRIDNAME.row(0)... etc but there doesn't seem to be any property that I can use to go to a specific row. Moreover, "e" doesn't contain a rowindex anyway. I'm baffled that this is so difficult to figure out - it seems like something that should be so simple. I'm sure someone has some kind of insight here. Thank you in advance!