Completed
Last Updated: 12 Oct 2015 14:53 by ADMIN
ADMIN
Hristo
Created on: 21 Mar 2015 09:44
Category: GridView
Type: Bug Report
0
FIX. RadGridView - when the control has self referencing hierarchical data and a column containing expander items is resized to a very small width so that there is not space for the expander items, th
Workaround - hide the expander items if space is not enough:

 private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
 {
     GridDataCellElement cell = e.CellElement as GridDataCellElement;
     if (cell != null && cell.SelfReferenceLayout != null)
     {
         foreach (RadElement element in cell.SelfReferenceLayout.StackLayoutElement.Children)
         {
             GridExpanderItem expanderItem = element as GridExpanderItem;
             if (expanderItem != null)
             {
                 if (cell.ColumnInfo.Width < cell.SelfReferenceLayout.StackLayoutElement.Size.Width)
                 {
                     expanderItem.Opacity = 0;
                 }
                 else
                 {
                     expanderItem.Opacity = 1;
                 }
             }
         }
     }
 }
0 comments