This is a migrated thread and some comments may be shown as answers.

clear Radfilter expression

1 Answer 53 Views
Filter
This is a migrated thread and some comments may be shown as answers.
rik butcher
Top achievements
Rank 1
rik butcher asked on 04 May 2012, 05:09 PM
ive got a function in the code behind that automatically adds an expression on a tab click on a mutli page.
but clicking back a tab simply creates another one.
how can i clear it FIRST AND THEN add the expression. i was hoping the RecreateControl would work

 

 

protected void showfilterTabs(int tab)

 

{

 

 

if (tab == 0)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");

 

expr1.Value =

 

"";

 

WorkOrdersRadFilter.RootGroup.AddExpression(expr1);

WorkOrdersRadFilter.RecreateControl();

}

 

 

else if (tab == 1)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");

 

expr1.Value =

 

"";

 

WorkOrderItemsRadFilter.RootGroup.AddExpression(expr1);

WorkOrderItemsRadFilter.RecreateControl();

}

 

 

else if (tab == 2)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");

 

expr1.Value =

 

"";

 

SearchAllOrdersRadFilter.RootGroup.AddExpression(expr1);

SearchAllOrdersRadFilter.RecreateControl();

}

 

 

else if (tab == 3)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");

 

expr1.Value =

 

"";

 

StorageWorkOrdersRadFilter.RootGroup.AddExpression(expr1);

StorageWorkOrdersRadFilter.RecreateControl();

}

 

 

else if (tab == 4)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");

 

expr1.Value =

 

"";

 

SearchAllItemsRadFilter.RootGroup.AddExpression(expr1);

SearchAllItemsRadFilter.RecreateControl();

}

 

 

else if (tab == 5)

 

{

 

 

RadFilterStartsWithFilterExpression expr1 = new RadFilterStartsWithFilterExpression("WORKORDERITEMDISPLAY");

 

expr1.Value =

 

"";

 

InventoriesRadFilter.RootGroup.AddExpression(expr1);

InventoriesRadFilter.RecreateControl();

}

}

1 Answer, 1 is accepted

Sort by
0
rik butcher
Top achievements
Rank 1
answered on 04 May 2012, 05:22 PM
never mind. my bad found the Clear Function
Tags
Filter
Asked by
rik butcher
Top achievements
Rank 1
Answers by
rik butcher
Top achievements
Rank 1
Share this question
or