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

InPlace Editing, Row Style

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 16 Feb 2016, 03:06 PM
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.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Feb 2016, 03:21 PM
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.

Regards,
Eyup
Telerik
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
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Eyup
Telerik team
Share this question
or