Another drop down before the field to choose the object

4 posts, 0 answers
  1. parobe01
    parobe01 avatar
    13 posts
    Member since:
    Dec 2011

    Posted 28 Feb 2012 Link to this post

    The original design called for a filter (Telerik’s filter control) inside a pane to slide in and out the results grid.
    I have a filter that would need to be slightly more advanced given the number of fields and objects that could be available.
    I am not sure if this is possible, but have another drop down before the field to choose the object. So first you choose the object, and then the fields available within that object appear in the next drop down. Example Control (Object) and ControlEffectiveness (Control field):
    ******************************************************
    AND + + x
    |_Organization Location EqualTo [ North America ] x
    |_ AND + + x
    |_ Control v ControlEffectiveness EqualTo [Ineffective ]x
    |Control|
    |Organization|
    |Process|
    *******************************************************

    In the above diagram, Control v is a field with drop down Control, Organization, Process etc... therefore here Control is an object and
    ControlEffectiveness is the control field.
    Is there a way we can have another drop down before the field to choose the object.
    Please Suggest!! ASAP

  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 02 Mar 2012 Link to this post

    Hi,

    Yes, you could use custom field editors as described in this help topic. Application which implements the same approach could be seen here.

    All the best,
    Andrey
    the Telerik team
    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 their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. parobe01
    parobe01 avatar
    13 posts
    Member since:
    Dec 2011

    Posted 02 Mar 2012 Link to this post

    Hi thanks for the reply, but have already gone through this url http://demos.telerik.com/aspnet-ajax/filter/examples/customeditors/defaultcs.aspx
    Please see the attach image for further details as to what i exactly want.
    Waiting for prompt reply.
    Thanks in advance.

  5. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 02 Mar 2012 Link to this post

    Hi,

    You could achieve your goal by using the demo application I have sent you. You just need to modify it a bit. You need to add one additional RadComboBox control and to modify the respective methods, namely:

    public override void InitializeEditor(System.Web.UI.Control container)
        {
            _combo = new RadComboBox();
            _combo.ID = "MyCombo";
            _combo.DataTextField = DataTextField;
            _combo.DataValueField = DataValueField;
            _combo.DataSource = DataSource;
            _combo.DataBind();
            _combo2 = new RadComboBox();
            _combo2.ID = "SecondCombo";
            _combo2.DataTextField = DataTextField;
            _combo2.DataValueField = DataValueField;
            _combo2.DataSource = DataSource;
            _combo2.DataBind();
            container.Controls.Add(_combo);
            container.Controls.Add(_combo2);
        }

    and so on.

    Give this approach a try and check whether you get the expected behavior.

    Kind regards,
    Andrey
    the Telerik team
    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 their blog feed now.
Back to Top