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.

Grouping Grid - filter Combo boxes

Thread ID:

Created:

Updated:

Platform:

Replies:

24994 Feb 15,2005 09:13 PM Mar 1,2005 11:43 AM Windows Forms 3
loading
Tags: Grouping
Richard
Asked On February 15, 2005 09:13 PM

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 05:21 AM

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 February 28, 2005 10:36 PM

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 11:43 AM

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");

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.

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.

;