To reproduce:
- Add self-reference hierarchy and set a checkbox column as expander column - show the column at runtime upon button click.
- You will notice that the layout is not updated properly.
- If the column is small the checkboxes appear in the next cell.
Workaround:
Update the layout when the column is made visible:
this.gridViewParameter.TableElement.UpdateView();
Set the ClipDrawing property of the checkbox cells to true:
void gridViewParameter_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement is GridCheckBoxCellElement)
{
e.CellElement.ClipDrawing = true;
}
else
{
e.CellElement.ResetValue(LightVisualElement.ClipDrawingProperty, Telerik.WinControls.ValueResetFlags.Local);
}
}