We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

dynamic datasource for combo in ggc

Thread ID:





23236 Jan 7,2005 12:11 AM Jan 7,2005 01:49 AM Windows Forms 1
Tags: Grouping
Administrator [Syncfusion]
Asked On January 7, 2005 12:11 AM

i have a ggc, there is a column of celltype = combo. this combo is attached with a datasource. i know that i can set the datasource like this: Me.ggc.TableDescriptor.Columns("NameofFamilyMember").Appearance.AnyRecordFieldCell.DataSource = dtbl but how do i set a different datasource for each record shown? for example, each record shows a family, the combo will be used to show its own family member list.

Administrator [Syncfusion]
Replied On January 7, 2005 01:49 AM

You can try handling the TableControlCurrentCellShowingDropDown event. There, try dynamically setting the DataSource on the dropdown.
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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.