add the 2nd one & changed the Filter Expression - it changes the expression on the top one and clears the text box. i sort of underStand why it's doing that, but what i don't know is how to tell it which one i'm on.
for instance say, two Field Editors: Workordernumber & PoNumber.(in that order)
i create one: workordernumber & put in a value.
then create another & when i change from workordernumber to PoNumber on the 2nd one, it changes the 1st one at the top and blanks out the Value previously put in. it's performing the RecreateControl on the wrong one.....or rather, not the one i intended. how could i limit the "ChangeExpression" to the one that's being change.
thanks again for any help
rik
protected void WorkOrdersRadFilter_ItemCommand(object sender, RadFilterCommandEventArgs e)
{
if(e.CommandName == RadFilter.AddExpressionCommandName)
{
e.Canceled =
true;
RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");
(e.ExpressionItem
as RadFilterGroupExpressionItem).Expression.AddExpression(item);
WorkOrdersRadFilter.RecreateControl();
}
else if (e.CommandName == RadFilter.ChangeExpressionFieldNameCommandName)
{
string myCmdArg = e.CommandArgument.ToString();
if (myCmdArg != "WOTYPENAME" & myCmdArg != "STATUS_MESSAGE" & myCmdArg != "MATERIALTYPE" & myCmdArg != "CREATEDDATE")
{
e.Canceled =
true;
RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression(e.CommandArgument.ToString());
//replace the current item with the new item that has the default filter set to StartsWith
int i = e.ExpressionItem.OwnerGroup.Expression.Expressions.IndexOf((e.ExpressionItem).OwnerGroup.Expression.FindByFieldName((((RadFilterSingleExpressionItem)(e.EventSource)).Expression).FieldName));
e.ExpressionItem.OwnerGroup.Expression.Expressions.RemoveAt(i);
e.ExpressionItem.OwnerGroup.Expression.Expressions.Insert(i, item);
WorkOrdersRadFilter.RecreateControl();
}
}
}