5 Answers, 1 is accepted
0
Hi Jokerwolf,
Kind regards,
Milan
the Telerik team
Could you please share more information about the problem? If Items.Count is zero there will be no items to be shown and no row could be expanded?
Kind regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Jokerwolf
Top achievements
Rank 1
answered on 28 Jul 2010, 11:18 AM
If Items.count = 0 then there will be no rows. I need to automaticly expand the row if it is the only row in the grid.
0
Jokerwolf
Top achievements
Rank 1
answered on 28 Jul 2010, 12:14 PM
Well, I've solved the problem by catching RowLoaded event and setting IsExpanded to true if grid.items.count == 1.
0
Jokerwolf
Top achievements
Rank 1
answered on 28 Jul 2010, 12:53 PM
Still need help with auto close for rows. When we close an expanded row, all its child expanded rows should close too, so when we expand this row again no child rows are expanded. I tried Row.IsVisibleChanged and it works fine, but that doesn't suite us, cause our application uses several tabs, so when we go to another tab, all rows becom invisible and close.
0
Accepted
Hello Jokerwolf,
Best wishes,
Milan
the Telerik team
With today's Internal Build we will introduce new event of RadGridView called RowIsExpandedChanged which can be utilized in you application.
void
clubsGrid_RowIsExpandedChanged(
object
sender, Telerik.Windows.Controls.GridView.RowEventArgs e)
{
var row = e.Row
as
GridViewRow;
var grid = e.OriginalSource
as
GridViewDataControl;
// if row was collapsed and that row was on the root grid
if
(!row.IsExpanded && grid ==
this
.rootGrid)
{
var childGrid = row.ChildrenOfType<GridViewDataControl>().FirstOrDefault();
if
(childGrid !=
null
)
childGrid.CollapseAllHierarchyItems();
}
}
Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items