This is a migrated thread and some comments may be shown as answers.

Gridview grouping style

1 Answer 81 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Indika
Top achievements
Rank 1
Indika asked on 26 Aug 2010, 11:49 PM
Hello, 

I am working on the application where contains the two different styles / themes (Light / Dark) . The user can switch between styles using the toggle button and it will merge the dictionaries. I have two issues which needed to be solved.

1.  I want to change the background colour of the grouped rows in the telerik grid.
2. When you switching between the styles, It will raises an error when is going to filtering the telerik grid. Error : Logical child element already exists. Disconnect it first. 

Could you please let me know, Is telerik supporting customized themes of the applications at the moment ? 

Thanking you

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 30 Aug 2010, 01:17 PM
Hello Indika,

As concerned to your first question,you can apply a style for the Grouped rows in the Grouped Event of the RadGridView using the following code (assuming that you have a style named GridViewRowStyle1 which resides in the Resources):

private void gridView_Grouped(object sender, GridViewGroupedEventArgs e)
{   
   if (this.gridView.IsGrouping)
   {        
         this.gridView.RowStyle = this.Resources["GridViewRowStyle1"] as Style; 
         }  
         else   
         {      
               this.gridView.RowStyle = null;   
         }
   }
}

Attached is a sample application that demonstrates such a behavior.

As for the second problem - it could be great if you send us a simple application that raises such an error.


Regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Indika
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or