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

GridLines in RadGrid

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mona
Top achievements
Rank 1
Mona asked on 18 Jan 2011, 11:23 AM
Hello All,

I have a RadGrid, I have applied skin webBlue to it, now what I want is the border for the items in the grid, I want the Gridlines on the grid. The only solution what I am getting is to apply border to all fields but I don't want to do this.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Jan 2011, 12:21 PM
Hello Mona,

I guess you want grid item border for some specific columns in RadGrid. If so you can try following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
       if (e.Item is GridDataItem)
       {
           GridDataItem item = (GridDataItem)e.Item;
           item["CustomerID"].BorderStyle = BorderStyle.Solid;
 
           item["CustomerID"].BorderColor = System.Drawing.Color.Red;
       }
   }

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