This is a migrated thread and some comments may be shown as answers.

Empty Grid does not calculate number of groups

4 Answers 24 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lily
Top achievements
Rank 1
Lily asked on 15 Feb 2011, 09:02 PM
Hi

This is a piece of code we have:

private

 

void radGridView1_GroupByChanged(object sender, GridViewCollectionChangedEventArgs e)

 

 

{

 

radGridView1.ShowGroupPanel = radGridView1.Groups.Count > 0;

 

}

 

 

this

 

 

.radGridView1.GroupByChanged += new Telerik.WinControls.UI.GridViewCollectionChangedEventHandler(this.radGridView1_GroupByChanged);

 


It works propely if gris something in it, but does not on empty grid.

Thank you
Lily

4 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 15 Feb 2011, 09:40 PM
Hi Lily,

I haven't had time to try this as yet, but I see you are using Groups, not groupDescriptor. Please amend with the following and let me know if this is ok for you

private void radGridView1_GroupByChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    radGridView1.ShowGroupPanel = (radGridView1.GroupDescriptors.Count > 0);
}

Hope that helps
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 16 Feb 2011, 03:16 PM
Hi Lily,

I hope this helped you. If so, please remember to mark as answer. If you need further help though, just let me know
Thanks
Richard
0
Lily
Top achievements
Rank 1
answered on 16 Feb 2011, 04:56 PM
Thank you. It helps. The solution works
0
Richard Slade
Top achievements
Rank 2
answered on 16 Feb 2011, 05:01 PM
Glad that helped. Please remember to mark as answer so others can find the solution too
All the best
Richard
Tags
GridView
Asked by
Lily
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Lily
Top achievements
Rank 1
Share this question
or