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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

dynamic datasource for combo in ggc

Thread ID:





23236 Jan 7,2005 05:11 AM UTC Jan 7,2005 06:49 AM UTC WinForms 1
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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon