My data table dt has columns are as below
Name, Value, key, IsMarkets, IsBudgets, IsPrograms
I have 3 check boxes chkbxBudgetsSearch,chkbxMarketsSearch,chkbxProgramsSearch
I want dt to be filtered on following condition
if chkbxMarketsSearch.IsChecked == true
all rows with IsMarkets=True should be displayed
if chkbxBudgetsSearch.IsChecked == true
all rows with IsBudgets=True should be displayed
similarly for programs
and if both check boxes are clicked then
all rows with IsMarkets=True and IsBudgets=False / IsMarkets=False and IsBudgets=True
/ IsMarkets=True and IsBudgets=True should be displayed
Note : its need not be only IsMarkets=True and IsBudgets=True
Its close to union operation
Can anyone wrire linq for this ?
EDIT: Okay, now that the question has changed:
Note that if none of the checkboxes is ticked, you won’t get any results.