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

Alternating Row Colour Conundrum

6 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 04 Nov 2010, 05:54 PM
Afternoon,

I've just got a strange behaviour from my gridviews. I recently updated my dataset and went about rebinding everything.

Since then however I have noticed that the alternating row colour no longer works. I am using the default colours.

The property window was telling me that it was set to true so I set this back to false and then to true again incase it had lost its setting but this changed nothing.

I have also set it to false/true inside both the property builder and set programmatically with the same result. I have also tried reopening the project.

Little bit stumped on this one, any one got any ideas?

Kind regards,

Guy

6 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 04 Nov 2010, 09:20 PM
Hi again Guy,

that sounds odd. I haven't been able to replicate this issue.
Where are you setting the
Me.RadGridView.EnableAlternatingRowColor = True
?

I have tried putting it in all sorts of plaves, and it always works. I even added it in a ContextmenuOpening event.
regards,
Richard
0
Emanuel Varga
Top achievements
Rank 1
answered on 05 Nov 2010, 07:42 AM
Hello,

Are you using CellFormatting in any case ? maybe you are overriding the alternate color there...
Or, if you are not using the latest version 914, please try updating to this version.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Guy
Top achievements
Rank 1
answered on 05 Nov 2010, 10:39 AM
Morning,

Richard - I'm putting it within the formload after everything else has been done.

Emanuel - I'm not using any cell formatting anywhere within the application and I have the latest version.

I can honestly not see why this has happened and I'm now starting to doubt my own eyes! I've attached a pic of a sample project with alternating colour rows enabled; could someone have a quick look and tell me if i'm going mad? I've got no other PC's to test this on to hand.

Many thanks,

Guy
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 05 Nov 2010, 10:57 AM
Hi Guy, 

Can you confirm a couple of points. 
* That the other things in the FormLoad event are being fired
* That if you add another grid on the same form, and bind it to the same datasource, that you can use Alternating Row Color. 

If the first is true, then ensure that the FormLoad event is wired up. 

If the second is true, then I'd advise  removing the current grid, adding a new one and rebinding, re-wiring the events. 

I suspect that there is an event or property that hasn't been re-wired correctly as I remember you said that you had to remove everything and re-add it after your issue with the dataset. 

Hope that helps
Richard
0
Guy
Top achievements
Rank 1
answered on 05 Nov 2010, 11:36 AM
Hi Richard,

Looks like an issue with the grid. Added a new one and everything is fine now.

Thank you both for your help.

Best regards,

Guy
0
Richard Slade
Top achievements
Rank 2
answered on 05 Nov 2010, 12:25 PM
Glad you have it sorted, Guy.

All the best
Richard
Tags
GridView
Asked by
Guy
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Emanuel Varga
Top achievements
Rank 1
Guy
Top achievements
Rank 1
Share this question
or