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

[Solved] Hide edit control during edit mode

1 Answer 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
weezie
Top achievements
Rank 1
weezie asked on 04 Jan 2010, 06:52 PM

I have a radgrid with editmode = inplace.  I just need to hide a radcombobox within an 

 

EditItemTemplate

 

during editmode, but not insert.
I tried doing a findcontrol("RadComboBox") during the ItemCommand event for 

 

RadGrid

 

.EditCommandName, but it just came back as null.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 04 Jan 2010, 09:59 PM
Hello Weezie,

I recommend you find the control in ItemCreated as shown below:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item.IsInEditMode && !(e.Item is IGridInsertItem))
    {
        RadComboBox radComboBox = e.Item.FindControl("RadComboBox1") as RadComboBox;
        radComboBox.Enabled = false;
    }
}

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
weezie
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or