Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
16739 | Jul 22,2004 06:34 PM UTC | Jul 22,2004 07:42 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
//assume dataTable1 is the full datatable that is the datasource for the combobox column.... private void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid.CurrentCell; if(cc.ColIndex == 2) //column that need to be filtered... { GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; if(cr != null) { DataView dv = new DataView(dataTable1); dv.RowFilter = string.Format("[MyCol1] = ''{0}''", this.gridDataBoundGrid1[cc.RowIndex, 1].Text); ((GridComboBoxListBoxPart)cr.ListBoxPart).DataSource = dv; } } }
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.
This page will automatically be redirected to the sign-in page in 10 seconds.