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

[Solved] Put only one column in edit mode

1 Answer 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lucas Harron
Top achievements
Rank 1
Lucas Harron asked on 02 Nov 2009, 10:25 PM
I was wondering if there is a way to put only one column in edit mode.

I have tried setting the ReadOnly property to true except the column I want to be in Edit mode. I then use:

for (int i = 0; i < RadGrid_Main.PageSize; i++)
{
       RadGrid_Main.EditIndexes.Add(i);
}

This achieves the effect I am looking for, but then the grid shows the Edit skin for every row. I want to grid to look normal except show edit boxes for only 1 column. Is there any way around this?

Thanks,
Lucas

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 03 Nov 2009, 09:28 AM
Hello Lucas,

You can either set the EditItemStyle>CssClass to the desired settings such that the grid in edit mode looks similar to the grid when its in normal view mode:
aspx:
<telerik:RadGrid ID="RadGrid1" runat="server" > 
     <EditItemStyle CssClass="myeditrow" /> 
            <MasterTableView> 

An alternative solution would be to use a GridTemplateColumn with a textbox in its ItemTemplate rather than setting readonly for all non editable columns and setting the whole grid in EditMode.

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