Hello
i´ve a problem to edit data , when i use the “EditEnd” Event , the event launches when i am finished with my input in the current row , now i can use
string
s2 = dataR.Cells[2].FieldName.ToString();
this is no problem and works
dataR.Cells[2].Content =
“test”;
this works also.
But if i want to get the value of the current datarow cell[2] there is an error
string s1 = dataR.Cells[2].Content.ToString();
My XAML is
<
xcdg:DataGridControl Margin=”0,0,-2,0″ Name=”dataGridControl1″ >
<xcdg:DataGridControl.Resources>
<Style TargetType=”{x:Type xcdg:DataRow}”>
<EventSetter Event=”xcdg:Row.EditEnded” Handler=”OnDataRowEditEnd”/>
</Style>
</xcdg:DataGridControl.Resources>
</xcdg:DataGridControl>
my C# Code is :
private void OnDataRowEditEnd(object sender, RoutedEventArgs e)
{
Xceed.Wpf.DataGrid.DataRow dataR = (Xceed.Wpf.DataGrid.DataRow)sender;
dataR.Cells[1].Content = “test”;
string s2 = dataR.Cells[2].FieldName.ToString();
string s1 = dataR.Cells[2].Content.ToString();
}
Has anybdy an idea whats wrong ?
I used the mouse double click event and there it works .
Imported from legacy forums. Posted by Victor (had 615 views)