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

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

1 Answer 21 Views
Button
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 16 Sep 2015, 07:42 PM

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.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 17 Sep 2015, 12:43 PM
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
Tags
Button
Asked by
Chris
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or