This question is locked. New answers and comments are not allowed.
Tushar Mehere
Top achievements
Rank 1
Tushar Mehere
asked on 04 Nov 2009, 03:10 AM
Hi,
I am displaying a Grid with table1 records. The same grid is used to display table2 records on selection from a tables dropdown.
My code works fine. It throws up when i group a column from table1 and then select table2 from the dropdown and try to bind the grid again.
I need a way to ungroup columns programmatically before rebinding with another table.
Thanks,
Tushar
I am displaying a Grid with table1 records. The same grid is used to display table2 records on selection from a tables dropdown.
My code works fine. It throws up when i group a column from table1 and then select table2 from the dropdown and try to bind the grid again.
I need a way to ungroup columns programmatically before rebinding with another table.
Thanks,
Tushar
5 Answers, 1 is accepted
0
Hello Tushar,
You can remove desired GroupDescriptor from GroupDescriptors. Check this demo for more info:
http://demos.telerik.com/silverlight/beta/#GridView/HeaderContextMenu
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You can remove desired GroupDescriptor from GroupDescriptors. Check this demo for more info:
http://demos.telerik.com/silverlight/beta/#GridView/HeaderContextMenu
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tushar Mehere
Top achievements
Rank 1
answered on 04 Nov 2009, 06:16 AM
Thanks for responding.
However, my question was how do i ungroup the grouped columns using c#. The demo links describe it in xaml.
In my project code i wrote
GroupDescriptorCollection disCol = this.Mygrid.GroupDescriptors;
disCol=null;
//bind grid
this did not work for me. let me know if i am missing something.
Appreciate your help.
Tushar
However, my question was how do i ungroup the grouped columns using c#. The demo links describe it in xaml.
In my project code i wrote
GroupDescriptorCollection disCol = this.Mygrid.GroupDescriptors;
disCol=null;
//bind grid
this did not work for me. let me know if i am missing something.
Appreciate your help.
Tushar
0
Hi Tushar,
You've missed header context menu implementation - check the code behind "Ungroup" menu item click.
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You've missed header context menu implementation - check the code behind "Ungroup" menu item click.
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tushar Mehere
Top achievements
Rank 1
answered on 04 Nov 2009, 07:17 PM
Thanks you very much. Yes i missed the link you sent.
I resolved my issue of ungrouping all columns dynamically with the following code:
foreach(Telerik.Windows.Data.GroupDescriptor gd in this.myGrid.GroupDescriptors)
{
if(gd!=null)
this.myGrid.GroupDescriptors.Remove(gd);
}
Thanks once again.
Tushar
I resolved my issue of ungrouping all columns dynamically with the following code:
foreach(Telerik.Windows.Data.GroupDescriptor gd in this.myGrid.GroupDescriptors)
{
if(gd!=null)
this.myGrid.GroupDescriptors.Remove(gd);
}
Thanks once again.
Tushar
0
Hello Tushar Mehere,
Sincerely yours,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You could also try " this.myGrid.GroupDescriptors.Clear()" to remove all group descriptors at once.
Sincerely yours,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
