Joined: 28 Feb 2005
|Posted: Mon Oct 24, 2016 9:58 pm Post subject:
|Yes. To disable editing for specific rows you need to handle the GetCellData event. After using the default binding to populate the CellData you can then set the CellData.Editor to null as shown below.
|private void _virtualTree_GetCellData(object sender, Infralution.Controls.VirtualTree.GetCellDataEventArgs e)
// get the default binding for the given row and use it to populate the cell data
RowBinding binding = _virtualTree.GetRowBinding(e.Row);
binding.GetCellData(e.Row, e.Column, e.CellData);
e.CellData.Editor = null;
This will prevent editing for all cells/rows so you would probably want to include a check based on e.Row.Item around setting the Editor to null.