Hi Paul,
Thank you for your interest in syncfusion products.
You can bind the datasource dynamically based on the selected value inside ‘CurrentCellShowedDropDown’ event. The following code explains the same.
void gridDataBoundGrid1_CurrentCellShowedDropDown(object sender, EventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (cc.ColIndex == 2)
//column that need to be filtered...
{
GridComboBoxCellRenderer cr = (GridComboBoxCellRenderer)cc.Renderer;
if (cr != null)
{
string text = gridDataBoundGrid1[cc.RowIndex, 1].Text;
if (text == "One")
{
((GridComboBoxListBoxPart)cr.ListBoxPart).DataSource = GetTable1();
((GridComboBoxListBoxPart)cr.ListBoxPart).DisplayMember = "Col2";
((GridComboBoxListBoxPart)cr.ListBoxPart).ValueMember = "Col1";
}
else
{
((GridComboBoxListBoxPart)cr.ListBoxPart).DataSource = GetTable();
((GridComboBoxListBoxPart)cr.ListBoxPart).DisplayMember = "Col1";
((GridComboBoxListBoxPart)cr.ListBoxPart).ValueMember = "Col2";
}
}
}
}
Please refer to the following sample which illustrates the same.
http://www.syncfusion.com/downloads/Support/DirectTrac/87557/ComboBoxGDBG-2065197015.zip
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.