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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

dynamic datasource for combo in ggc 2.1.0.9

Thread ID:

Created:

Updated:

Platform:

Replies:

23236 Jan 7,2005 05:11 AM UTC Jan 7,2005 06:49 AM UTC WinForms 1
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On January 7, 2005 05:11 AM UTC

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 06:49 AM UTC

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.
	}
}

CONFIRMATION

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.

Warning Icon 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.Close Icon

;