i have a radgrid which i want to filter using the radfilter control.
it kind of works but i guess i'm missing something.
i have a textbox which filter three columns of the radgrid, i then have two radcomboboxes that filter a column each.
i want to combine these filters together so the user can filter down to the record they want.
i'm not getting any errrors, but if you use the textbox and the classdisplayname filter i won't it to come back with the textsearch but only display the records in that class. at the moment its displaying the textsearch and all classes regardless of what i select
what am i doing wrong
it kind of works but i guess i'm missing something.
i have a textbox which filter three columns of the radgrid, i then have two radcomboboxes that filter a column each.
i want to combine these filters together so the user can filter down to the record they want.
protected
void
Filter_Click(
object
sender, EventArgs e)
{
if
(QuickSearchBox.Text !=
""
)
{
RadFilterContainsFilterExpression expression1 =
new
RadFilterContainsFilterExpression(
"Synopsis"
);
SearchRadFilter.RootGroup.AddExpression(expression1);
SearchRadFilter.RootGroup.GroupOperation = RadFilterGroupOperation.Or;
RadFilterContainsFilterExpression expression2 =
new
RadFilterContainsFilterExpression(
"Title"
);
SearchRadFilter.RootGroup.AddExpression(expression2);
SearchRadFilter.RootGroup.GroupOperation = RadFilterGroupOperation.Or;
RadFilterContainsFilterExpression expression3 =
new
RadFilterContainsFilterExpression(
"Text"
);
SearchRadFilter.RootGroup.AddExpression(expression3);
expression1.Value = QuickSearchBox.Text;
expression2.Value = QuickSearchBox.Text;
expression3.Value = QuickSearchBox.Text;
}
RadFilterGroupExpression group =
new
RadFilterGroupExpression();
group.GroupOperation = RadFilterGroupOperation.And;
RadFilterContainsFilterExpression expr =
new
RadFilterContainsFilterExpression(
"ClassDisplayName"
);
expr.Value = TypeFilter.SelectedValue;
SearchRadFilter.RootGroup.AddExpression(group);
group.AddExpression(expr);
RadFilterGroupExpression group2 =
new
RadFilterGroupExpression();
group2.GroupOperation = RadFilterGroupOperation.And;
RadFilterContainsFilterExpression expr2 =
new
RadFilterContainsFilterExpression(
"NodeParentID"
);
expr2.Value = NodeValue.Value;
SearchRadFilter.RootGroup.AddExpression(group2);
group.AddExpression(expr2);
SearchRadFilter.FireApplyCommand();
}
i'm not getting any errrors, but if you use the textbox and the classdisplayname filter i won't it to come back with the textsearch but only display the records in that class. at the moment its displaying the textsearch and all classes regardless of what i select
what am i doing wrong