I have been facing some issues in grouping in gridview actually I have a multiselect combox having some of the fields (actually columns from grid) which are displayed in the grid (along with some other columns in grid). Now when some of the multiselect combobox field are checked the grid should be grouped accordingly and when unchecked the griview grouping should go off, now the following are the issues I'm facing
- When some of the fields are checked in combobox the grid is grouped accordingly but actually grouping happens twice (i.e. the same group appears twice in the grid). now if we manuaaly remove this grouping (by clicking on the cross in the group headers) and check some or the other fields in combox again then the grouping happens as expected.
- When any of the fields in combox are unchecked the event is fired but the grouping in grid doesn't goes off.
i'm breaking my head on this issue for last one day.......please if anyone has ever come across such issue please do suggest the solution.
Below is my code\event that I am using-
Multiselect combobox-
<
telerikInput:RadComboBox FontFamily="Verdana" IsEditable="False" FontSize="10" x:Name="radcmbGroupMitigationsBy" HorizontalAlignment="Left" Width="135" Margin="40,45,0,0" VerticalAlignment="Top">
<telerikInput:RadComboBox Height="25" Width="0"/>
<telerikNavigation:RadTreeView x:Name="radtvGroupMitigationsBy" SelectionMode="Multiple" Checked="radtvGroupMitigationsBy_Checked" Unchecked="radtvGroupMitigationsBy_Unchecked">
</telerikNavigation:RadTreeView>
</telerikInput:RadComboBox>
Events-
private
void radtvGroupMitigationsBy_Checked(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
var radtvItem = e.OriginalSource as RadTreeViewItem;
GroupDescriptor groupCriteria = new GroupDescriptor();
groupCriteria.Member = radtvItem.ToString();
groupCriteria.SortDirection =
ListSortDirection.Ascending;
this.rdgMitigationEvents.GroupDescriptors.Add(groupCriteria);
}
private void radtvGroupMitigationsBy_Unchecked(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
var currentItem = e.OriginalSource as RadTreeViewItem;
GroupDescriptor groupCriteria = new GroupDescriptor();
groupCriteria.Member = currentItem.ToString();
this.rdgMitigationEvents.GroupDescriptors.Remove(groupCriteria);
}
Besides this I am not sure in which event to uncheck the combobox checked items if the user removes the grouping manually ie by clicking on the cross in grioup header in grouping panel above the grid.
I am using Silverlight 3.0.40723.0 and telerik radcontrols for Silverlight version 2009.2.812.1030
Please, please help me to fix this soon.
Thanks in Advance,
Abhishek Chauhan