2017-10-06 82 views
0

我試圖對過濾器表達式如下默認在c#添加過濾器網格和,或在Telerik的弧度濾波器組表達式

(student id=45624 and(college Id=4125 or college id =78455 or college id=54521)) 

我試圖用下面的代碼

var id= new RadFilterEqualToFilterExpression<string>("student "); 
id.Value = "45624"; 
RadFilterps.RootGroup.AddExpression(id); 

RadFilterps.RootGroup.GroupOperation = RadFilterGroupOperation.Or; 

var Cid1= new RadFilterEqualToFilterExpression<string>("college "); 
Cid1Value = "4125 "; 
RadFilterps.RootGroup.AddExpression(Cid1); 

var Cid2= new RadFilterEqualToFilterExpression<string>("college "); 
Cid2.Value = "78455 "; 
RadFilterps.RootGroup.AddExpression(Cid2); 

var Cid3= new RadFilterEqualToFilterExpression<string>("college "); 
Cid3.Value = "54521 "; 
RadFilterps.RootGroup.AddExpression(Cid3); 

謝謝

回答

0

通過使用兩個不同的羣體表達如下得到它

RadFilterGroupExpression group2 = new RadFilterGroupExpression(); 
group2.GroupOperation = RadFilterGroupOperation.Or; 
RadFilterps.RootGroup.AddExpression(group2);