Answered by:
MultiHandleSlider: cant get even a simple working example to run

Question
-
User379887107 posted
Hello,
Im using vs2012, all latest updates. Using the latest ajax control tookit 15.1.1.100
I am unable to get even a simple instance of this MultiHandleSlider to work and im tearing my hair out in frustration.
From this http://ajaxtoolkit.net/MultiHandleSlider/MultiHandleSlider.aspx I can see the control should work and its perfect for what I want.
I have created a simple new webforms basic solution, targeting .net 4.5.
Ive copy pasted basic samples from the web for this control. There are no errors when I run it. But the control only ever shows 1 single drag handle, even if I remove all MultiHandleSliderTarget it still shows 1 drag handle that drags ok.
If I try to access the list of MultiHandleSliderTarget in the code behind it shows the collection to be null.
foreach (MultiHandleSliderTarget target in MultiHandleSliderExtender1.MultiHandleSliderTargets)
target.ControlID = MultiHandleSliderExtender1.Parent.FindControl(target.ControlID).ClientID;If I try to add them programmatically in code behind I get an error
Type 'AjaxControlToolkit.MultiHandleSliderTarget' in Assembly 'AjaxControlToolkit, Version=15.1.1.100, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' is not marked as serializable
So im pretty much at my wits end on this, does this control even work in any way ?
Im desperate I need some help please.
None of the target controls are in an containers its just a simple webform where im trying to get this multihandle control running.
<cc1:MultiHandleSliderExtender ID="MultiHandleSliderExtender1"
runat="server" ShowHandleDragStyle="false"
BehaviorID="MultiHandleSliderExtender1" TargetControlID="txtSlider"
Length="500" ShowInnerRail="false"
EnableMouseWheel="true" Increment="1"
RaiseChangeOnlyOnMouseUp="true" EnableRailClick="true"
OnClientDragEnd="" OnClientDrag=""
ShowHandleHoverStyle="true"
Maximum="222" Minimum="1" BoundControlID ="txtSlider">
<cc1:MultiHandleSliderTargets>
<cc1:MultiHandleSliderTarget ControlID="lblStartRange" runat="server" />
<cc1:MultiHandleSliderTarget ControlID="lblEndRange" runat="server" />
</cc1:MultiHandleSliderTargets>
</cc1:MultiHandleSliderExtender>Thursday, April 9, 2015 11:58 PM
Answers
-
User61956409 posted
Hi,
Thanks for your post.
Please try the following sample.
<div> <table> <tr valign="middle"> <td> <asp:TextBox ID="multiHandle2_1_BoundControl" runat="server" Width="30" Text="25" /> </td> <td valign="top"> <asp:TextBox ID="sliderTwo" runat="server" Style="display: none;" /> <cc1:MultiHandleSliderExtender ID="multiHandleSliderExtenderTwo" runat="server" BehaviorID="multiHandleSliderExtenderTwo" TargetControlID="sliderTwo" Minimum="0" Maximum="100" Length="175" TooltipText="{0}" Orientation="Vertical" EnableHandleAnimation="true" EnableKeyboard="false" EnableMouseWheel="false" ShowHandleDragStyle="true" ShowHandleHoverStyle="true"> <MultiHandleSliderTargets> <cc1:MultiHandleSliderTarget ControlID="multiHandle2_1_BoundControl" /> <cc1:MultiHandleSliderTarget ControlID="multiHandle2_2_BoundControl" /> </MultiHandleSliderTargets> </cc1:MultiHandleSliderExtender> </td> <td style="padding-left: 21px"> <asp:TextBox ID="multiHandle2_2_BoundControl" runat="server" Width="30" Text="75" /> </td> </tr> </table> </div>
Best Regards,
Fei Han
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, April 12, 2015 10:09 PM
All replies
-
User61956409 posted
Hi,
Thanks for your post.
Please try the following sample.
<div> <table> <tr valign="middle"> <td> <asp:TextBox ID="multiHandle2_1_BoundControl" runat="server" Width="30" Text="25" /> </td> <td valign="top"> <asp:TextBox ID="sliderTwo" runat="server" Style="display: none;" /> <cc1:MultiHandleSliderExtender ID="multiHandleSliderExtenderTwo" runat="server" BehaviorID="multiHandleSliderExtenderTwo" TargetControlID="sliderTwo" Minimum="0" Maximum="100" Length="175" TooltipText="{0}" Orientation="Vertical" EnableHandleAnimation="true" EnableKeyboard="false" EnableMouseWheel="false" ShowHandleDragStyle="true" ShowHandleHoverStyle="true"> <MultiHandleSliderTargets> <cc1:MultiHandleSliderTarget ControlID="multiHandle2_1_BoundControl" /> <cc1:MultiHandleSliderTarget ControlID="multiHandle2_2_BoundControl" /> </MultiHandleSliderTargets> </cc1:MultiHandleSliderExtender> </td> <td style="padding-left: 21px"> <asp:TextBox ID="multiHandle2_2_BoundControl" runat="server" Width="30" Text="75" /> </td> </tr> </table> </div>
Best Regards,
Fei Han
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, April 12, 2015 10:09 PM -
User379887107 posted
Ok thanks for that.
I see my issue was having the tag prefix on this tax<cc1:MultiHandleSliderTargets>. Once i compared to this code, and removed the cc1: prefix it worked.
I added the cc1: prefix to correct the pseudo error that shows in the designer. I didn't realize it could screw the handle entry up.
I have success full added 4 handles now which is great. Can you tell me please is it possible to have 4 handles and two "inner" ranges with different inner colors ?
So i would have handle 1 and handle 2 and the color between them is red, inner rail colour
then "space" that is the outer rail color
then handle 3 and handle 4 and the color between them is also red inner rail color.
I want the user to be able to select two inner rail ranges on one slider. Is that possible ?
thanks
Monday, April 13, 2015 4:58 AM -
User61956409 posted
Hi,
I have success full added 4 handles now which is great. Can you tell me please is it possible to have 4 handles and two "inner" ranges with different inner colors ?I recommend to discussed one issue in one thread, so please post a new thread to explain your new problem.
Thanks for understanding.
Best Regards,
Fei Han
Monday, April 20, 2015 3:16 AM