Home Forums WinForms controls Xceed Grid for WinForms Sorting messes up alternate row styles Reply To: Sorting messes up alternate row styles

User (Old forums)
Member
Post count: 23064

How do you apply the row style to the grid?  If you do it in one of the following two ways, it should work fine :

gridControl1.ApplyStyleSheet(

StyleSheet.Tan );

//or

gridControl1.DataRowTemplateStyles.Add(

new VisualGridElementStyle() );

gridControl1.DataRowTemplateStyles.Add(

new VisualGridElementStyle() );

gridControl1.DataRowTemplateStyles[ 0 ].BackColor =

Color.Blue;

gridControl1.DataRowTemplateStyles[ 1 ].BackColor =

Color.Red;

 

Imported from legacy forums. Posted by André (had 272 views)