Using rad button and rad dropdown list to link to a sorted radgrid.

2 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Sep 2015

    Posted 16 Sep 2015 Link to this post

    Hey, so I'm trying to use a rad dropdown and a rad button that will, when a value is selected, link to a rad grid that is then automatically sorted by the value chosen.

     

    <telerik:RadDropDownList ID="RadDropDownList1" runat="server" DataTextField="Org" DataValueField="Org" DefaultMessage="Org List" DataSourceID="orgDropDown" Skin="Office2010Black"></telerik:RadDropDownList>
    <br />
    <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton" ButtonType="LinkButton" Skin="Office2010Black"></telerik:RadButton>

    protected void RadButton2_Click(object sender, EventArgs e)
    {
        DropDownListItem selectedItem = RadDropDownList1.SelectedItem;
        if (selectedItem != null)
        {
     
        }
        
    }

     

    I have this so far but I'm absolutely lost as to what to do next.

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 17 Sep 2015 Link to this post

    Hello Chris,

    You can use the fireCommand method to execute a Sort operation, which will raise the ItemCommand event of the grid:
    http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html

    Alternatively, you can use the FireCommandEvent method to achieve the requested functionality on the code-behind:
    http://www.telerik.com/help/aspnet-ajax/grid-fire-command-event-from-code.html


    Bear in mind that if you need to change the columns structure dynamically, you should follow the steps provided in the following article:
    http://www.telerik.com/help/aspnet-ajax/grid-changing-structure-dynamically.html

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top