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

[Solved] Dependant combos on grid?

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
stuart johnstone
Top achievements
Rank 1
stuart johnstone asked on 26 Jan 2010, 10:19 PM

Dependant combos on grid

 

Is possible to have dependant combos on a grid that are bound server side?

What I want to happen is somehow rebind the DataSource when another combo box in the grid changes.

So for example Combo A was Continents and Combo B was counties I would want to filter the country list (Combo B) depending on what is selected in the continents (Combo A).  I can’t see any server events that fire upon selecting a combo within a grid.

Note that to further complicate things my columns are dynamically created.  

Any help would be much appreciated!!!
 

Below is a shortened extract of my code:-

protected void uxResults_ItemDataBound(object sender, GridItemEventArgs e)

{

 

  GridDropDownListColumnEditor

 

combo = null;

  editMan = editedItem.EditManager;

  GridDataItem item = (GridDataItem)e.Item;

  if (e.Item is GridEditableItem )

  {

    if ((e.Item as GridEditableItem).IsInEditMode)

    {

      combo = editMan.GetColumnEditor(dr["Column Name"].ToString()) as GridDropDownListColumnEditor;

      combo.DataSource = ApplyFilter(item, combo, dr, ds);

      combo.DataBind();

    }

  }

}

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 27 Jan 2010, 08:09 AM
Hi Stuart,

For more information about how to achieve the required functionality, you could review this code library:
Using related RadComboBoxes in RadGrid

I hope this helps.

Greetings,
Pavlina
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
stuart johnstone
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or