Format Rows without using Conditional Formatting object or RowFormatting Events?

4 posts, 0 answers
  1. rjmorton
    rjmorton avatar
    17 posts
    Member since:
    Aug 2006

    Posted 03 Feb 2009 Link to this post

    Hi all,

    Just been doing a search on this and I think I'm stuck...

    Is there really no way to programatically format a row other than use the Conditional formatting object or the RowFormatting Events?

    In any other grid out there, I would be able to do something like:
    myGrid.Rows(3).Backcolor = Color.Maroon;
    Seems slightly short sighted if I can't do the same thing with the RADGrid control

    I notice with RADGrid, I can do 'myGrid.Rows(3).VisualElement.Backcolor = Color.Maroon;', but VisualElement is only the rows that are currently scrolled into view.

    The reason I ask is because I want to format certain rows based on a series of criteria that isn't anything to do with the value of the cells, so ConditionalFormatting is out and RowFormatting event would be very cludgy for this.
    Surely there must be a simple way to programatically format certain rows?

  2. Fabien
    Fabien avatar
    43 posts
    Member since:
    Sep 2008

    Posted 04 Feb 2009 Link to this post


    please take a look on here
    I provided the way to do this.

    Any questions? Don't hesitate.

    Best regards,

  3. DevCraft banner
  4. rjmorton
    rjmorton avatar
    17 posts
    Member since:
    Aug 2006

    Posted 04 Feb 2009 Link to this post

    Thanks Fabien,
    I'll take a look.
  5. Jack
    Jack avatar
    2335 posts

    Posted 05 Feb 2009 Link to this post

    Hi Richard,

    I understand your concerns.

    You are correct in your suspicions. There are two ways to customize cells in grid. The one is to use conditional formatting objects and the other is to process the CellFormatting object. You can't access the VisualElement of non visible cells, because of the virtualization used in RadGridView. Here you can find more about this.

    Actually, you are the first to request a different approach to customize cells. We will consider your suggestion when developing our future versions. Feel free to give us more details on the behavior you want to achieve.

    Should you have any other questions, please do not hesitate to write me back.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top