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

RadSlider in RadGrid EditTemplate

1 Answer 11 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Fit2Page asked on 15 Apr 2015, 01:57 PM

I try to implement a RadSlider in RadGrid EditTemplate according to this demo

 

demos.telerik.com/aspnet-ajax/slider/examples/databinding/defaultvb.aspx

 Something like this:

 

http://www.ulealliance.org/certification/list.aspx

 

But the JavaScript cannot find the slider and tooltipmanager.

Could you test with a short demo app?

PS: I do not need the functionality with the thumbnails, onlu Slider ith step Tooltips.

 

Thanks,

Marc

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 20 Apr 2015, 12:49 PM
Hi Marc,

Note that when you place a RadSlider control (or another ASP.NET control) in the EditTemplate of RadGrid, the slider control in each item of the grid will have a unique ClientID, while the approach shown in the demo you linked is designed for a single slider instance.

In order to modify the demo example for multiple sliders, you could use the following method that gets the client-side objects of all sliders
function get_allRadSliders() {
    var allRadSliders = [];
    var allRadControls = $telerik.radControls;
    // all RadControls are referenced
 
    for (var i = 0; i < allRadControls.length; i++) {
        var element = allRadControls[i];
 
        if (Telerik.Web.UI.RadSlider && Telerik.Web.UI.RadSlider.isInstanceOfType(element)) {
            allRadSliders.push(element);
        }
    }
    // only the RadSliders are gathered into an array
 
    return allRadSliders;
}
then call the sliderValueChanged method in pageLoad for each slider.

Placing the RadToolTipManager in the EditTemplate should not be required, because you need only one tooltip manager to handle the tooltips on the page.

Regards,
Slav
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Slider
Asked by
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Slav
Telerik team
Share this question
or