Filter Methods not working

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

    Posted 06 Jul 2011 Link to this post

    i have a rad Filter like below. i want to switch out the Display Name based on a condition.

    <

     

     

    telerik:RadFilter ID="WorkOrdersRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"

     

     

     

    OnApplyExpressions="WorkOrdersRadFilter_Apply" ApplyButtonText="Filter Work Orders"

     

     

     

    OnPreRender="RadFilter_PreRender" OnFieldEditorCreating="RadFilter_FieldEditorCreating"

     

     

     

     

     

    OnFieldEditorCreated

     

     

    ="RadFilter_FieldEditorCreated"

     

     

    >
    <FieldEditors>

     

     

     

    <telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="Work Order#"

     

     

     

    DataType="System.String" />

     

     

     

     

    <

     

     

    goldcustom:RadFilterComboBoxEditor FieldName="WOTYPENAME" DisplayName="WO Type"

     

     

     

     

     

     

     

    DataTextField="WOTYPENAME" DataSourceID="WorkOrderTypeFilterODS" DataType="System.String"

     

     

     

     

     

     

     

    ComboBoxSkin="WebBlue" />

     

     

     

     

    <

     

     

    telerik:RadFilterTextFieldEditor FieldName="TRACKINGNUMBER" DisplayName="Tracking#"

     

     

     

    DataType="System.String" />

     

     

     

    <telerik:RadFilterTextFieldEditor FieldName="KEYREFERENCE" DisplayName="Key Ref"

     

     

     

    DataType="System.String" />

     

    </FieldEditors>

     

     

     

    </telerik:RadFilter>
    i tried what was suggested in one of the tutorials, but it never seems to fire this event.i also tried OnFieldEditorCreating which simply is used to invoke the class for radComboBoxes and that never fires either unless of course it's a radComboBox.
    i assume that i want to do this when i click the "Add Expression" button on the RadFilter. is there some way i can switch out the DisplayName?? i've been thru every tutorial i can find, but nothing really works.
    can i get some direct help? i'm a registered developer, do you guys need any info from me?
    thanks
    rik


    Want to run something like this to switch out the Display name depending on a condition:

     

    protected void RadFilter_FieldEditorCreated(object sender, RadFilterFieldEditorCreatedEventArgs e)

    {

        if (e.Editor.FieldName == "WORKORDERNUMBER")

        {

            e.Editor.DisplayName = "My custom text";

        }

    }

  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 11 Jul 2011 Link to this post

    Hello Rik,

    The OnFieldEditorCreating and OnFieldEditorCreated events are raised for custom field editors only.
    In order to implement the desired functionality, I recommend that find the corresponding editor in the FieldEditors collection and set its display name:
    protected void Page_Load(object sender, EventArgs e)
    {
        (RadFilter1.FieldEditors[1] as RadFilterTextFieldEditor).DisplayName = "DisplayName";
    }

    I hope this helps.

    Greetings,
    Mira
    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!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. rik butcher
    rik butcher avatar
    106 posts
    Member since:
    Jul 2009

    Posted 11 Jul 2011 Link to this post

    that will totally work for what we are doing. thank you so much.
    rik
Back to Top