Hi,
Is there a way to display grid lines while in edit mode for RadGrids? I have seen a few forum posts mentioning this, but the solution wasn't very clear to me and didn't really show how you go about it.
Help on this issue would be greatly appreciated.
Regards,
Luke
Is there a way to display grid lines while in edit mode for RadGrids? I have seen a few forum posts mentioning this, but the solution wasn't very clear to me and didn't really show how you go about it.
Help on this issue would be greatly appreciated.
Regards,
Luke
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 01 Jul 2009, 07:08 AM
Hi Luke,
I am not sure what exactly is your requirement. You may try the following code snippet if you want the entire Grid to be in edit mode.
CS:
You may also set the EditMode property to InPlace if you want the Grid to show inline editing.
ASPX:
Shinu
I am not sure what exactly is your requirement. You may try the following code snippet if you want the entire Grid to be in edit mode.
CS:
| protected void RadGrid1_PreRender(object sender, EventArgs e) |
| { |
| foreach (GridDataItem item in RadGrid1.MasterTableView.Items) |
| { |
| item.Edit = true; |
| } |
| RadGrid1.MasterTableView.Rebind(); |
| } |
You may also set the EditMode property to InPlace if you want the Grid to show inline editing.
ASPX:
| <MasterTableView EditMode="InPlace" Name="Master" > |
Shinu
0
Peter
Top achievements
Rank 1
answered on 02 Jul 2009, 12:00 AM
Hi Shinu,
I should of probably explained it a bit clearer. I currently have the grid set to InPlace mode and when I click my edit button on a row the columns for that row do no longer have columns. I'm wondering if there is a way to keep the grid lines while in edit mode. I have attached two screenshots. On being in non-edit mode displaying the grid lines and one in edit mode showing how there are no longer grid lines.
http://i970.photobucket.com/albums/ae187/paulehn/grid-withines.jpg
http://i970.photobucket.com/albums/ae187/paulehn/grid-nolines.jpg
I should of probably explained it a bit clearer. I currently have the grid set to InPlace mode and when I click my edit button on a row the columns for that row do no longer have columns. I'm wondering if there is a way to keep the grid lines while in edit mode. I have attached two screenshots. On being in non-edit mode displaying the grid lines and one in edit mode showing how there are no longer grid lines.
http://i970.photobucket.com/albums/ae187/paulehn/grid-withines.jpg
http://i970.photobucket.com/albums/ae187/paulehn/grid-nolines.jpg
0
Accepted
Hello Peter,
You can add vertical cell borders to the edit row with CSS like this:
div.RadGrid_Office2007 .rgEditRow td
{
border-left: 1px solid #d0d7e5;
padding-left: 7px;
}
The padding has to be changed in order to keep the header and data cells aligned properly in IE.
Greetings,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can add vertical cell borders to the edit row with CSS like this:
div.RadGrid_Office2007 .rgEditRow td
{
border-left: 1px solid #d0d7e5;
padding-left: 7px;
}
The padding has to be changed in order to keep the header and data cells aligned properly in IE.
Greetings,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Peter
Top achievements
Rank 1
answered on 02 Jul 2009, 11:16 PM
Thanks Dimo, works perfectly!
