i have rad grid
fill database. have check box
filter rows in checked mode. have list of strings
contains specific ids.
here grid:
id name ------------ 1 john 2 steve 3 joe 4 sara
here list of strings:
"2","4"
i need when checkbox checked filter rows id exists in list.
private void checkmajor_checkstatechanged(object sender, eventargs e) { if (checkmajor.checked) // here custom filter else this.gridshoplist.columns["idcol"].filterdescriptor = new filterdescriptor(); }
how such thing? , more on how make complex custom filtering on rows?
here can see how filter grid more 1 condition: compositefitlerdescriptor
here sample:
list<string> list = new list<string>() {"2", "4"}; compositefilterdescriptor compositefilter = new compositefilterdescriptor(); compositefilter.logicaloperator = filterlogicaloperator.or; foreach (var item in list) { compositefilter.filterdescriptors.add(new filterdescriptor("id", filteroperator.isequalto, item)); } this.radgridview1.columns["idcol"].filterdescriptor = compositefilter;