Article information
Article relates to
RadGridView for WinForms, Q2 2010
Created by
Nikolay Diyanov
Last modified
July 27, 2010
Last modified by
Alexander Georgiev, Telerik
private
bool
IsExpandable(GridViewRowInfo rowInfo)
{
if
(rowInfo.ChildRows !=
null
&& rowInfo.ChildRows.Count > 0)
return
true
;
}
false
void
radGridView1_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
GridGroupExpanderCellElement cell = e.CellElement
as
GridGroupExpanderCellElement;
(cell !=
&& e.CellElement.RowElement
is
GridDataRowElement)
(!IsExpandable(cell.RowInfo))
cell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
else
cell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Visible;
radGridView1_ChildViewExpanding(
sender, ChildViewExpandingEventArgs e)
e.Cancel = !IsExpandable(e.ParentRow);
Resources Buy Try