RadGrid populate drop down in insert/edit mode

asp.netradgridteleriktelerik-grid

I have a RadGrid which has in place insert and edit functionality.

One of the fields is a drop down.

My requirements are

  • When the user clicks "Add New" I want to be able to change some of the properties on the dropdown and populate it when data
  • When the user edits a row I need to change the selected index of the drop down to show the data being edited and disable it.
    I somehow need to handle one of the grids events, determine if its in insert/edit mode and then use FindControl to get access to my drop down.

Ive looked at a number of events such as ItemCommand, DataBound, ItemCreated etc and I just cant figure out how to get access to my drop down? I need to know what object I need to call find control on to get to my drop down.

Thanks.

Best Answer

Start from this doc and bear in mind that to determine the insert/update operation, you can check the GridTableView.IsItemInserted property and the EditItems collection of the grid respectively. The appropriate events to change item values or disable the dropdown are ItemDataBound and ItemCreated.

Related Topic