Working with FlexGrid > Editing > Configuring Editors |
Whether you are using built-in or custom editors, you can take advantage of the PrepareCellForEdit event to configure the editor before it is activated. For example, the code below changes the editor to show selections as yellow on blue:
C# |
Copy Code
|
---|---|
// hook up event handler _grid.PrepareCellForEdit += _grid_PrepareCellForEdit; // customize editor by changing the appearance of the selection void _grid_PrepareCellForEdit(object sender, CellEditEventArgs e) { var b = e.Editor as Border; var tb = b.Child as TextBox; tb.SelectionBackground = new SolidColorBrush(Colors.Blue); tb.SelectionForeground = new SolidColorBrush(Colors.Yellow); } |