Alternating Row Colour Conundrum

7 posts, 1 answers
  1. Guy
    Guy avatar
    60 posts
    Member since:
    Sep 2010

    Posted 04 Nov 2010 Link to this post

    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
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Nov 2010 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 05 Nov 2010 Link to this post

    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
  5. Guy
    Guy avatar
    60 posts
    Member since:
    Sep 2010

    Posted 05 Nov 2010 Link to this post

    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
  6. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 05 Nov 2010 Link to this post

    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
  7. Guy
    Guy avatar
    60 posts
    Member since:
    Sep 2010

    Posted 05 Nov 2010 Link to this post

    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
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 05 Nov 2010 Link to this post

    Glad you have it sorted, Guy.

    All the best
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready