Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
23781 | Jan 19,2005 02:05 PM UTC | Jan 18,2010 09:49 AM UTC | WinForms | 6 |
![]() |
Tags: GridControl |
dvTest.RowFilter = theFilterBar.RowFilter;
Try this.
dvTest.RowFilter = dvTest.RowFilter + " AND " + theFilterBar.RowFilter;
theFilterBar.RowFilter = "";
>dvTest.RowFilter = theFilterBar.RowFilter;
>
>Try this.
>
>dvTest.RowFilter = dvTest.RowFilter + " AND " + theFilterBar.RowFilter;
>theFilterBar.RowFilter = "";
>
>
>
GridTestFilterBar_4346.zip
private void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; if(cc.RowIndex == 1 && cc.ColIndex > 0) { GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; ListBox lb = cr.ListBoxPart; DataTable dt = lb.DataSource as DataTable; string colName = dt.Columns[0].ColumnName; dt = new DataTable("MyTable"); dt.Columns.Add(new DataColumn(colName)); DataRow dr = dt.NewRow(); dr[0] = "(none)"; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = "(custom)"; dt.Rows.Add(dr); foreach(DataRowView drv in this.dvTest) { dr = dt.NewRow(); dr[0] = drv[colName]; dt.Rows.Add(dr); } lb.DataSource = dt; } }
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.