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

Conditional Formatting Rules

2 Answers 218 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
cheekl
Top achievements
Rank 2
cheekl asked on 12 Jul 2011, 10:14 AM
Hi,
I created a conditional formatting rules for subreport
where
expression = Fields.Item1
Operator = In
Value = 1,2,3
style.visisble = false

But the subreport still visible. If i create multiple rules using operator "=" then it works.
How can I use operator "In"?



2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 12 Jul 2011, 05:50 PM
Hi Cheekl,

The IN operator requires an object array but the expression engine doesn't supports syntax for specifying object array. However you can use an user function to convert a comma separated string value to an object[] as shown in the following code snippet and sample value expression:

public static object[] ConvertStringArray(string value)
{
    return value.Split(',');
}

= ConvertStringArray("1,2,3") 

All the best,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
cheekl
Top achievements
Rank 2
answered on 13 Jul 2011, 05:08 AM
Hi Peter,
Thanks for your help. It works.
Tags
General Discussions
Asked by
cheekl
Top achievements
Rank 2
Answers by
Peter
Telerik team
cheekl
Top achievements
Rank 2
Share this question
or