RB
Ragamathulla B
Syncfusion Team
September 12, 2011 07:09 AM UTC
Hi Imc,
Thank you for your interest in sycnfusion products.
You can bind the datasource dynamically using TableControlCurrentCellShowingDropDown event. The following code explains same.
private void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridComboBoxCellRenderer renderer = cc.Renderer as GridComboBoxCellRenderer;
if(renderer != null)
{
GridComboBoxListBoxPart listBoxPart = (GridComboBoxListBoxPart)renderer.ListBoxPart;
// now conditionally set listBoxPart.DataSource
listBoxPart.DataSource = SomeDataSourceYouWantToSet.
}
}
Let me know if you have further concerns.
Regards,
Ragamathullah B.
MU
muii
September 12, 2011 04:21 PM UTC
so it works perfect
thanks