I have a GridView in which the child is loaded manually via a RowSourceNeeded event. I am using the ChildViewExpanded event to detect that the child is being collapsed (!IsExpanded). As part of the collapse, I would like to delete all of the child rows, thus forcing another RowSourceNeeded event (Data refresh) when the child view is expanded. I have tried the following and many others without success.
private void radGridViewDatabases_ChildViewExpanded(object sender, ChildViewExpandedEventArgs e)
{
if (e.IsExpanded)
{
e.ChildRow.Height = Math.Min(90 + (e.ChildViewInfo.ChildRows.Count * 18), 500);
}
else
{
if (e.ChildViewInfo.HasChildRows())
{
foreach (GridViewRowInfo oGridViewInfo in e.ChildViewInfo.Rows)
{
oGridViewInfo.Delete();
}
}
}
return;
}
Any ideas?
Thanks in advance
private void radGridViewDatabases_ChildViewExpanded(object sender, ChildViewExpandedEventArgs e)
{
if (e.IsExpanded)
{
e.ChildRow.Height = Math.Min(90 + (e.ChildViewInfo.ChildRows.Count * 18), 500);
}
else
{
if (e.ChildViewInfo.HasChildRows())
{
foreach (GridViewRowInfo oGridViewInfo in e.ChildViewInfo.Rows)
{
oGridViewInfo.Delete();
}
}
}
return;
}
Any ideas?
Thanks in advance