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

loop thru rad filter

1 Answer 36 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 02 Jul 2013, 11:36 AM
is it possible to loop thru the "stand alone" radFilter and get the FieldNames + any Vaule used rather than have a huge GLOB of text to Parse thru?
i've been using RadFilters for over three years and don't really need a link to a tutorial unless it specifically shows this function. i was wondering if it's even possible.
usually i wind up w/ this to deal with:
 WHERE  (WORKORDERNUMBER LIKE '12345%' AND TRUNC(INVOICEDATE) >= TO_DATE('7/1/2013 12:00:00 AM','MM/DD/YYYY HH12:MI:SS AM') AND PROFITCENTERCODE LIKE '0708%')

this is great for tacking onto a dynamic query - but, i'd like to be able to capture which field was used and what value was passed.
thx
rik


 

 

<telerik:RadFilter ID="VolSummaryRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true" OnFieldEditorCreating="VolSummaryRadFilter_FieldEditorCreating"

 

 

 

OnPreRender="VolSummaryRadFilter_PreRender" OnApplyExpressions="VolSummaryRadFilter_Apply" Visible="false" OnItemCommand="VolSummaryRadFilter_ItemCommand">

 

 

 

<FieldEditors>

 

 

 

 

<telerik:RadFilterDateFieldEditor FieldName="INVOICEDATE" DisplayName="Invoice Date"

 

 

 

DataType="System.DateTime" MinDate="1/1/1900" />

 

 

 

 

<

 

 

telerik:RadFilterTextFieldEditor FieldName="PROFITCENTERCODE" DisplayName="Profit Ctr Code"

 

 

 

 

 

 

 

DataType="System.String" />

 

 

 

 

<

 

 

telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="WorkOrder #" DataType="System.String" />

 

 

 

</FieldEditors>

 

 

 

</telerik:RadFilter>

 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 05 Jul 2013, 08:16 AM
Hi Rik,

A possible solution is to get the expressions items by calling GetSingleExpressionItems() method which will return all expressions which are currently used. Then you could loop through all items and get the FieldName and the entered value. Note that you have to cast InputControl to appropriate control type in order to get the input value. I prepared a small sample and attached it to this thread.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Filter
Asked by
rik butcher
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or