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

RadSliderItem from Datatable, from FilterTemplate

1 Answer 42 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Nick Keefe
Top achievements
Rank 1
Nick Keefe asked on 15 Mar 2010, 08:02 PM
Greetings,

I'm attempting to follow the process from:
http://www.telerik.com/support/kb/aspnet-ajax/slider/a-radslideritem-for-each-record-in-a-datatable.aspx

However, my radslider appears in a FilterTemplate and not as a normal control.  How can I mimick what this KB article describes but for a radslider that appears as a FilterTemplate.  I can't seem to reference my radslider in the C# code, as it can't find the control.

Basically, I want my FilterTemplate's Radsliders min and max values to not be static, but something I can query into a dataset and pulled from there instead.  I'm sure it's a simple thing to do, however I'm sure how to find the control in the C# code.

Thanks!



1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 16 Mar 2010, 03:53 PM
Hello Nick Keefe,
In case you are using RadGrid, you can access the slider control, defined in the FilterTemplate the following way:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="AccessDataSource1" AllowFilteringByColumn="True"
    GridLines="None" ondatabound="RadGrid1_DataBound">

protected void RadGrid1_DataBound(object sender, EventArgs e)
{
    foreach (GridFilteringItem filterItem in RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem))
    {
        RadSlider slider = (RadSlider)filterItem.FindControl("RadSlider1");
        slider.MaximumValue = 20;
    }
}

Greetings,
Tsvetie
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Slider
Asked by
Nick Keefe
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or