loop thru rad filter

2 posts, 0 answers
  1. rik butcher
    rik butcher avatar
    106 posts
    Member since:
    Jul 2009

    Posted 02 Jul 2013 Link to this post

    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>

     

  2. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 05 Jul 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top