InPlace Editing, Row Style

2 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    573 posts
    Member since:
    Mar 2004

    Posted 16 Feb 2016 Link to this post

    I would like my rows which are in EditMode to have the same appearance as regular rows. I see there is an rgEditRow class. How do I go about making sure this class doesn't contribute to the row's style? Are there any other classes I need to consider? Again, I just want the rows to appear the same regardless of whether the row is being edited or not.
  2. Eyup
    Eyup avatar
    3322 posts

    Posted 19 Feb 2016 Link to this post

    Hi Albert,

    You can use the following approach to achieve this requirement:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        if (e.Item.IsInEditMode && !(e.Item is IGridInsertItem))
            e.Item.CssClass = e.Item.ItemIndex % 2 == 0 ? "rgRow" : "rgAltRow";

    I hope this will prove helpful.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top