Sometimes you may get a requirement to hide the unwanted operators in advance mode of adf query search.
I have created view criteria on employess table with FirstName. Now the requirment is i want to hide the BETWEEN and NOTBETWEEN operators for FirstName Field in advance search mode.
By using the below code you can hide the operators.
<CompOper
Name="Name"
Oper="BETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
Here is my view criteria code.
<ViewCriteriaRow
Name="EmployeesViewCriteria_row_0"
UpperColumns="1">
<ViewCriteriaItem
Name="FirstName"
ViewAttribute="FirstName"
Operator="="
Conjunction="AND"
Value=":bFname"
IsBindVarValue="true"
Required="Optional">
<CompOper
Name="Name"
Oper="BETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
<CompOper
Name="Name"
Oper="NOTBETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
</ViewCriteriaItem>
<ViewCriteriaItem
Name="LastName"
ViewAttribute="LastName"
Operator="="
Conjunction="AND"
Value=":bLname"
IsBindVarValue="true"
Required="Optional">
</ViewCriteriaItem>
</ViewCriteriaRow>
I have created view criteria on employess table with FirstName. Now the requirment is i want to hide the BETWEEN and NOTBETWEEN operators for FirstName Field in advance search mode.
By using the below code you can hide the operators.
<CompOper
Name="Name"
Oper="BETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
Here is my view criteria code.
<ViewCriteriaRow
Name="EmployeesViewCriteria_row_0"
UpperColumns="1">
<ViewCriteriaItem
Name="FirstName"
ViewAttribute="FirstName"
Operator="="
Conjunction="AND"
Value=":bFname"
IsBindVarValue="true"
Required="Optional">
<CompOper
Name="Name"
Oper="BETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
<CompOper
Name="Name"
Oper="NOTBETWEEN"
ToDo="-1"
MinCardinality="0"
MaxCardinality="0"/>
</ViewCriteriaItem>
<ViewCriteriaItem
Name="LastName"
ViewAttribute="LastName"
Operator="="
Conjunction="AND"
Value=":bLname"
IsBindVarValue="true"
Required="Optional">
</ViewCriteriaItem>
</ViewCriteriaRow>
No comments:
Post a Comment