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

Catch events grid columns.

2 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
lea ginsberger
Top achievements
Rank 1
lea ginsberger asked on 28 Jan 2010, 11:18 AM

We bought the package of controls and enjoy your very use it!

In use Grid - are there a possibility to catch events of grid controls?

 We have two  GridDropDownColumn one of the city and other of the street - we want that on choice of the GridDropDown city  the GridDropDown  street, will be refresh by the selected city.

 The question is how catch  the event on server  side GridDropDown events?

 We tried to register to the event on  Grid_itemDataBound event but apparently it's too late  Because It did not register.

 

protected

 

void Grid_mdr_Midrasha_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

{

 

 

RadComboBox list = (e.Item as GridEditableItem)["iCityId"].Controls[0] as RadComboBox;

 

list.MarkFirstMatch =

true;

 

list.SelectedIndexChanged +=

new RadComboBoxSelectedIndexChangedEventHandler(list_SelectedIndexChanged);

 

}

}

 

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Jan 2010, 12:01 PM
Hello Lea,

Check out the following demo whihc illustrates on a similar scenario as yours. In the example, when the grid is in edit mode, the second dropdownlist is populated by the first dropdownlist by making use of the ItemCreated event of the grid:
Accessing Cells and Rows

Thanks
Princy.
0
lea ginsberger
Top achievements
Rank 1
answered on 01 Feb 2010, 09:48 AM
Thank you!

It's working.
Tags
Grid
Asked by
lea ginsberger
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
lea ginsberger
Top achievements
Rank 1
Share this question
or