S
Stu0
Guest
have a datagrid that contains my observable collection of items. When I want to edit and update my cell in column ModuleType I get an empty column (null) and can't update the values in my collection and get additional errors because it didn't update.
Am I doing something wrong or is there another way of doing this? I am pretty new to C#.
Event Method:
private void ModulesTable_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
{
Log.Debug("EDITING END");
if (e.EditAction == DataGridEditAction.Commit)
{
Log.Debug("COMMIT");
var column = e.Column as DataGridBoundColumn;
Log.Debug("COLUMN: " + column);
if (null != column)
{
Log.Debug("NOT NULL"); // CANNOT GET IN HERE
var bindingPath = (column.Binding as Binding).Path.Path;
if (bindingPath == "Col2")
{
int rowIndex = e.Row.GetIndex();
var el = e.EditingElement as ComboBox;
Log.Debug("RowIndex: " + rowIndex + ", Type: " + el.Text);
}
}
}
}
Continue reading...
Am I doing something wrong or is there another way of doing this? I am pretty new to C#.
Event Method:
private void ModulesTable_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
{
Log.Debug("EDITING END");
if (e.EditAction == DataGridEditAction.Commit)
{
Log.Debug("COMMIT");
var column = e.Column as DataGridBoundColumn;
Log.Debug("COLUMN: " + column);
if (null != column)
{
Log.Debug("NOT NULL"); // CANNOT GET IN HERE
var bindingPath = (column.Binding as Binding).Path.Path;
if (bindingPath == "Col2")
{
int rowIndex = e.Row.GetIndex();
var el = e.EditingElement as ComboBox;
Log.Debug("RowIndex: " + rowIndex + ", Type: " + el.Text);
}
}
}
}
Continue reading...