Hi,
I would like to add conditional formatting to cells in the summary footer row (I want the display values from GridViewColumn.AggregateFunctions to have different background colors based on if they are negative or positive, plus other conditions).
I see that there is a property for GridViewColumn.GroupFooterCellStyleSelector, but what I think I need is one for a property that does not exist in the API: GridViewColumn.FooterCellStyleSelector...
How should I proceed?
Kind Regards,
Albert
I would like to add conditional formatting to cells in the summary footer row (I want the display values from GridViewColumn.AggregateFunctions to have different background colors based on if they are negative or positive, plus other conditions).
I see that there is a property for GridViewColumn.GroupFooterCellStyleSelector, but what I think I need is one for a property that does not exist in the API: GridViewColumn.FooterCellStyleSelector...
How should I proceed?
Kind Regards,
Albert
4 Answers, 1 is accepted
0
Hello Albert,
I have prepared a sample project that you can find attached. It shows you a possible approach for achieving the desired functionality.
Yoan
the Telerik team
I have prepared a sample project that you can find attached. It shows you a possible approach for achieving the desired functionality.
I hope this is what you need.
Yoan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Albert
Top achievements
Rank 1
answered on 30 Apr 2013, 03:57 PM
Hello Yoan,
Thanks for the reply. I see that you are handling the RadGridView.AutoGeneratingColumn event to achieve the "GridViewColumn.FooterCellStyleSelector" type of behaviour I need.
The grid I am working on has AutoGenerateColumns="False". Can you recommend another event to handle, please?
Kind Regards,
Albert
Thanks for the reply. I see that you are handling the RadGridView.AutoGeneratingColumn event to achieve the "GridViewColumn.FooterCellStyleSelector" type of behaviour I need.
The grid I am working on has AutoGenerateColumns="False". Can you recommend another event to handle, please?
Kind Regards,
Albert
0
Hello Albert,
Kind regards,
Yoan
the Telerik team
In this case you can handle the CellEditEnded event:
private void clubsGrid_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
this.clubsGrid.Columns["StadiumCapacity"].Footer = ((DataTemplate)this.Resources["ss"]).LoadContent();
}
Kind regards,
Yoan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Hello Albert,
All the best,
Yoan
the Telerik team
Just a quick update - Actually, you can apply the Footer's style right after InitializeComponent() :
public MainWindow()
{
InitializeComponent();
this.clubsGrid.Columns["StadiumCapacity"].Footer = ((DataTemplate)this.Resources["ss"]).LoadContent();
}
All the best,
Yoan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.