正确更改回发时的 Ajax MultiHandle Slider 参数

发布于 2024-09-06 02:18:53 字数 471 浏览 3 评论 0原文

在 VS2010 中,我有 VB.NET 代码隐藏 aspx 页面,并且我使用 Ajax 多句柄滑块扩展来过滤数值搜索结果。

首先,多手柄滑块不会显示在设计器中...我必须删除滑块目标标签: 为了使其在设计器中显示......这并不是一个大问题,而是一个烦恼。

我正在显示给定类别中的项目。 因此,我获取该类别中所有商品的最高和最低价格,并适当地分配滑块扩展最大/最小值。

这工作正常,直到... 我更改项目类别并获取滑块控件的新最大/最小值。 我设置最大/最小值,然后将每个目标文本框值设置为相应的最大/最小值。

滑块手柄无法正确重新绘制(或初始化?) 比如说我的初始最小值/最大值是 1/100 如果我进行完整的回发并将最大值更改为 1000,则滑块(正确地)保持相同的大小,但手柄出现在页面右侧,我必须滚动到它。 当我单击它时,它会弹回到滑块上。

我正在拉头发...为什么滑块手柄仅在我第一次设置最小/最大值时才正确显示?

In VS2010 I have VB.NET codebehind aspx pages and I'm using Ajax multihandleslider extensions to filter search results on numerical values.

Fistly, the multihandle sliders don't display in the designer... I have to remove the slider targets tag:

In order to make it display in the designer... this isn't so much a big issue but an annoyance.

I am displaying items in a given category.
So I get the max and min prices for all items in that category and assign the sliderextension max/min values appropriately.

This works fine until...
I change the item category and go get a new max/min value for the slider control.
I set the max/min values, then I set the target textbox values each to the corresponding max/min values.

The slider handles don't repaint (or init?) properly
Like say for example my initial min/max is 1/100
if I do a full postback and change the max value to 1000 then the slider bar (correctly) stays the same size but the handle appears WAYYYY to the right off the page and I have to scroll to it.
When I click it, it shoots back onto the slider bar.

I'm pulling my hair out... why do the slider handles only appear properly when I first set the min/max values?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

紫竹語嫣☆ 2024-09-13 02:18:54

也许这个响应有点晚了,但对于任何遇到此问题的人来说,解决方案是重置/清除 MultiHandleSliderExtender ClientState。

对于上面的例子:

ajctMultiHandleSliderExtender.ClientState = "0";

或者

ajctMultiHandleSliderExtender.ClientState = "1,1000";

Maybe this response is to little to late, but for anyone who have this problem the solution is to reset/clear MultiHandleSliderExtender ClientState.

For the above example:

ajctMultiHandleSliderExtender.ClientState = "0";

or

ajctMultiHandleSliderExtender.ClientState = "1,1000";
送你一个梦 2024-09-13 02:18:54

我还没有解决 AJAX 滑块的初始问题,但我使用了 Telerik 滑块,他们没有这个问题。
仅供任何偶然发现这一点的读者参考。

I haven't resolved the intial problem with the AJAX sliders but I used the Telerik sliders and they do not have this issue.
Just FYI for any readers who stumble upon this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文