ラベル restrict の投稿を表示しています。 すべての投稿を表示
ラベル restrict の投稿を表示しています。 すべての投稿を表示

2012年3月26日月曜日

Restrict slider from moving past maximum value

Hi,

I am very new to the ajaxcontrol toolkit. I need to implement a slider for one of my projects at school. I created a simple <sliderextender> and bound it to a textbox as shown in the example. For some reason, when I run it, the slider is able to slide past the maximum value and keeps sliding. Anyone seen this before? Below is the code:

<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:TextBox ID="slider1" runat="server" />
<asp:TextBox id="sliderbound1" runat="server" Width="30" />
<cc1:SliderExtender ID="SliderExtender1"
runat="server"
Minimum="0" Maximum="100" EnableHandleAnimation="true"
Orientation="Horizontal" TargetControlID="slider1" BoundControlID="sliderbound1">
</cc1:SliderExtender>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

Hi,

the reason is an old issue whose fix has not been yet propagated to the release branch :(

If you download one of the latest development branch from here, the issue should be resolved.

If you have downloaded the source code for the latest release:

1. Go to Slider/SliderBehavior.js

2. Find this line (lineno 323 in my file): this._handleAnimation = new $AA.LengthAnimation( ...

3. Replace $AA with: AjaxControlToolkit.Animation

4. Recompile the source code


Hi Garbin,

Thanks a bunch, the fix worked like a charm :)

Thanks,

Praveen


restricting the drop area of a control

how would one restrict the drop area of a control usingDragOverlayExtender?Hi,

the drop area in this case is the BODY area, thus there's no practical way to control it without changing the whole layout of the page.

Restricting start date on Calendar extender.

How can I restrict the calendar so the user can not select a past date or dates prior to a specific date? And similarly for future date. Or do I need to validate it on

OnClientDateSelectionChanged

Thanks.

Yes, you would need to do some validation. One method you can use though is toremove the arrows that let the user cycle through the months based on a certain month/year combination.