Example: DataGridView with two columns type DataGridViewComboBoxCell where first column wrap one datatable and detrmine second column (cell) with RowFilter. I try with CellBeginEdit event and all other events and cells property but after first good RowFilter I have '...value not valid' for the next row and another filter.
Problem is that , after first RowFilter I mast some say DefaultView.RowFilter="" to get full datatable to be ready for another filter in next row.So I must have for the evry row diferent filter for the same cell which determine cell in first column
I have
....dataGridView1_CellBeginEdit....
datatable.DefaultView.RowFilter = "field name=" + dataGridView1.CurrentRow.Cells[n].Value.ToString();
dataGridView1_many Events ...cells property and so on..
DefaultView.RowFilter="";
I can't find the best way for that !
what is the best startup place for RowFilter (CellBeginEdit ?)
what is the best place for DefaultView.RowFilter ="";
regard, goran
Loading
Amit ChoudharyPosted Apr 25, 2010, 11:04 PM
you have one thing is missing rest i think you are doing great...
here in your code datatable.DefaultView.RowFilter = "field name=" + dataGridView1.CurrentRow.Cells[n].Value.ToString();
the underlined portion is doubtful... as i get here you want to access the value of first ComboBoxColumn.. so first find the combobox and get its refrence get the selected value and apply the filter.
Please mark as answer if it helps.