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

Disabling form elements in the Grid Edit form

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 28 Aug 2008, 03:44 PM
I need to programatically disable and enable form elements in the grid edit form at run time. I have not found a resource for this in your documentation. Is this possible?

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 28 Aug 2008, 04:18 PM
Hi Michael ,

You can use the following code in order to get a reference to the EditForm's elements

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if ((e.Item is GridEditFormItem) && e.Item.IsInEditMode) 
        { 
            GridEditFormItem gridEditFormItem = (GridEditFormItem)e.Item; 
            gridEditFormItem["MyColumnName"].FindControl("HTMLControl"); 
        } 
    } 


Additional information about how to access cells and rows in RadGrid you can gather from this source:

http://www.telerik.com/help/aspnet-ajax/grdaccessingcellsandrows.html


All the best,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Michael
Top achievements
Rank 2
Answers by
Missing User
Share this question
or