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

Grouping Grid - filter Combo boxes

Thread ID:





24994 Feb 16,2005 02:13 AM UTC Mar 1,2005 04:43 PM UTC WinForms 3
Tags: Grouping
Asked On February 16, 2005 02:13 AM UTC

Hi, We are using a grouping grid with combo boxes in it, our data source has 2 columns, a value member and a display member, we are doing it like this. grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.CellType = "ComboBox"; grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.DataSource = dataTable; grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.DisplayMember = strDisplayMember; grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.ValueMember = strValueMember; grid1.TableDescriptor.Columns[strColName].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.ShowCurrentCellEditing; my question is, how can we filter the dropdowns, to show subsets of the data source based on the group they fall within?

Administrator [Syncfusion]
Replied On February 16, 2005 10:21 AM UTC

You can try handling this.gridGroupingControl1.TableControlCurrentCellShowingDropDown and provide filtered DataSources to the droplist at that point. Here is a KB link that discusses this for GridDataBoundGrid, but I think something similar should work here as well. http://www.syncfusion.com/Support/article.aspx?id=567

Administrator [Syncfusion]
Replied On March 1, 2005 03:36 AM UTC

from the example, it appears that it retrieve the key for the slave table using colindex (numeric). if i drag and change the order of the column, i will not be able to retrieve. how to i access using the column name instead?

Administrator [Syncfusion]
Replied On March 1, 2005 04:43 PM UTC

Try code like this to get an arbitray value in that event using a column name. GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo; Record rec = style.TableCellIdentity.DisplayElement.ParentRecord as Record; object someValue = rec.GetValue("SomeColumName");


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