Hi I am building an 8020 financial report, and displaying customers in a grid. The data we are getting has a boolean called Top80 which depicts if the customer was in the top 80% of revenue contributors.
I have a group on this and it works fine, what I want though is the header for the false one to say "Bottom 20%" and the true one to say "Top 80%", instead of True and False. Can I do this? Seems like an easy thing?
Also can I expand the group for True after it has been databound, so the top80 is expanded and bottom 80 is collapsed?
Thank you.
My code is as follows:
I have a group on this and it works fine, what I want though is the header for the false one to say "Bottom 20%" and the true one to say "Top 80%", instead of True and False. Can I do this? Seems like an easy thing?
Also can I expand the group for True after it has been databound, so the top80 is expanded and bottom 80 is collapsed?
Thank you.
My code is as follows:
void reportingservices_GetCustomerTurnoverCompleted(object sender, reportingservices.GetCustomerTurnoverCompletedEventArgs e) |
{ |
_CustomerTurnoverData = e; |
RadGrid8020.GroupDescriptors.Add(new GroupDescriptor(){Member="Top80", SortDirection = System.ComponentModel.ListSortDirection.Ascending, DisplayContent="Top 80"}); |
RadGrid8020.ItemsSource = _CustomerTurnoverData.Result; |
RadGrid8020.Grouped += new EventHandler<GridViewGroupedEventArgs>(RadGrid8020_Grouped); |
} |
void RadGrid8020_Grouped(object sender, GridViewGroupedEventArgs e) |
{ |
//Need to do something here to open the group? |
} |
<telerikGridView:RadGridView |
x:Name="RadGrid8020" |
MinWidth="400" MaxWidth="900" |
ShowGroupPanel="false" |
CanUserDeleteRows="false" |
CanUserFreezeColumns="false" |
CanUserInsertRows="false" |
CanUserReorderColumns="true" |
CanUserResizeColumns="false" |
CanUserSelect="true" |
CanUserSortColumns="true" |
IsReadOnly="true" |
AutoGenerateColumns="false" ScrollMode="RealTime" |
> |
<telerikGridView:RadGridView.SortDescriptors> |
<telerikData:SortDescriptor Member="Rank" SortDirection="Ascending" /> |
</telerikGridView:RadGridView.SortDescriptors> |
<telerikGridView:RadGridView.Columns> |
<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding Rank}" Header="Rank" IsFilterable="false" IsSortable="true" /> |
<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding CustomerName}" Header="Client" HeaderTextAlignment="Left" IsFilterable="false" IsSortable="true" TextAlignment="Left" /> |
<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding JobCount}" Header="Job Count" HeaderTextAlignment="Right" IsFilterable="false" IsSortable="true" TextAlignment="Right" DataFormatString="{}{0:n0}" /> |
<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding Turnover}" Header="Turnover" HeaderTextAlignment="Right" IsFilterable="false" IsSortable="true" TextAlignment="Right" DataFormatString="{}{0:c2}" /> |
<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding AverageJobTurnover}" Header="Avg Per Job" HeaderTextAlignment="Right" IsFilterable="false" TextAlignment="Right" DataFormatString="{}{0:c2}" /> |
</telerikGridView:RadGridView.Columns> |
</telerikGridView:RadGridView> |