BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
dataGrid.CurrentCellEndEdit += DataGrid_CurrentCellEndEdit;
private void DataGrid_CurrentCellEndEdit(object sender, GridCurrentCellEndEditEventArgs args)
{
var row = this.dataGrid.GetRowGenerator().Items.FirstOrDefault(x=>x.RowIndex == args.RowColumnIndex.RowIndex);
List<DataColumnBase> columnCollection = row.GetType().GetRuntimeProperties().FirstOrDefault(x => x.Name == "VisibleColumns").GetValue(row) as List<DataColumnBase>;
var column = columnCollection.FirstOrDefault(col => col.GridColumn == dataGrid.Columns[args.RowColumnIndex.ColumnIndex]);
if (column != null)
((column as IElement).Element as GridCell).NeedToInvalidate = true;
} |
Hi,
at first: thanks for your fast reply.
This solution is only partially working. I need to check for two properties naming "warning" and "maximum" of my model in the ValueConverter. I tried to bind the whole Object with {Binding Path=., Converter... The Converter gets the whole object in OnAppearing , but is no more called in OnCurrentCellEndEdit. Calling the Converter is only working when I bind to my "Value" (StudentMarks in your Sample) Property.
I also tried a few things of passing the warning and maximum as Converter Parameters, but without success. Style.DataTrigger also didn't work.
I also found a possible bug in your sample: when I change the "sfgrid:GridTextColumn" to "sfgrid:GridNumericColumn" (I need a Numeric Column in my case) the BackroundColor is changing but the Text isn't visible anymore. Transforming your sample solution to my current project the text is not missing.
So finally I need a way to pass two additional properties of my model (or the whole model) to the converter.
Greetings
Christopher