This question is locked. New answers and comments are not allowed.
Hi,
I have to use a +/- button for expanding and collapsing the rows instead of > under a particular group. But if there is no row or no data under that group, there should be no +/- button.
Below is my code snippet :
<telerik:RadGridView x:Name="dgSelectedStudent" Grid.Row="1" Margin="5,0,10,5"
ItemsSource="{Binding Path=CountryStudentList, Mode=TwoWay}" Height="220" Width="400"
AutoGenerateColumns="False" IsReadOnly="True" AutoExpandGroups="True"
CanUserFreezeColumns="False" ShowGroupPanel="False"
CanUserResizeColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding StudentName}" x:Name="txtbStudent" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
xaml.cs------
public IEnumerable CountryStudentList
{
get { return _countryStudentList; }
set
{
PagedCollectionView pcv = new PagedCollectionView(value);
pcv.GroupDescriptions.Add(new PropertyGroupDescription("CountryName"));
_countryStudentList= pcv;
}
}
It may be possible that for some countries, there will be no student.
Now if there is no student in that country, then there will be CountryName without any expand/collapse(+/-) button.
Need your help ASAP.
I have to use a +/- button for expanding and collapsing the rows instead of > under a particular group. But if there is no row or no data under that group, there should be no +/- button.
Below is my code snippet :
<telerik:RadGridView x:Name="dgSelectedStudent" Grid.Row="1" Margin="5,0,10,5"
ItemsSource="{Binding Path=CountryStudentList, Mode=TwoWay}" Height="220" Width="400"
AutoGenerateColumns="False" IsReadOnly="True" AutoExpandGroups="True"
CanUserFreezeColumns="False" ShowGroupPanel="False"
CanUserResizeColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding StudentName}" x:Name="txtbStudent" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
xaml.cs------
public IEnumerable CountryStudentList
{
get { return _countryStudentList; }
set
{
PagedCollectionView pcv = new PagedCollectionView(value);
pcv.GroupDescriptions.Add(new PropertyGroupDescription("CountryName"));
_countryStudentList= pcv;
}
}
It may be possible that for some countries, there will be no student.
Now if there is no student in that country, then there will be CountryName without any expand/collapse(+/-) button.
Need your help ASAP.