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

Styling edited row problem

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yoe
Top achievements
Rank 1
Yoe asked on 29 Jun 2012, 01:34 PM
I don't understand where styling for edited row is coming from. In this case my grid is using WebBlue skin with default settings. When I click on "Edit" row becomes "highlighted" with white background overriding grid's row background and rendering bottom border. What I would like to have is for the row being edited to inherit background from the grid or have its background transparent (so that grid's row background is showing thru) and to get rid of bottom border. I'm attaching few images reference. One is showing normal grid with WebBlue skin and then two additional images show what the rows look like when I click on "Edit" button.

Of course, I have read this part of the documentation but none of the suggestions had any effect. I edited GridEditRow_WebBlue but nothing chagned.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jul 2012, 10:10 AM
Hello,

Try setting the CSS class for the edited row as shown below.
C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
 if (e.Item is GridEditableItem && e.Item.IsInEditMode)
 {
   GridEditableItem item = (GridEditableItem)e.Item;
   if (item.ItemIndex % 2 != 0)
   {
      item.CssClass = "edit";
   }
 }
}
CSS:
.edit
{
  background-color: #DAE2E8;
}

Thanks,
Princy.
Tags
Grid
Asked by
Yoe
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or