Jul 10, 2012, 8:11 AM
[CLOSED] Slider control - SetValue()
Hi Guys,
I've got a strange issue with the Ext.NET slider control I was hoping someone could shed some light on.
Put simply, I have a basic page with a slider control with a simple change listener:
This seems to set the value visually on page, but when I click my save button and use the corrosponding sldProbability.GetValue() it returns Int.MinValue if the slider has not been moved by the user. (If the slider has been moved by the user then the value is reported within the range I'd expect 0-100.
Am I using the incorrect method to set the value here? or retrieve it? feels like I'm doing something wrong but slightly unsure what, any thoughts?
Many thanks,
Doug
I've got a strange issue with the Ext.NET slider control I was hoping someone could shed some light on.
Put simply, I have a basic page with a slider control with a simple change listener:
<ext:Slider runat="server" ID="sldProbability" MinValue="0" MaxValue="100" Increment="1" Width="250">
<Listeners>
<Change Fn="ProbabilityChange" />
</Listeners>
</ext:Slider>
The listener simply sets a label value (largely irrelevant for this issue but posted for completeness): var ProbabilityChange= function (oSlider) {
lblProbPercent.setValue(oSlider.getValue() + '%');
};
The issue is this. On page load I would like to set the initial value of the slider to 50. To do this I've tried setting the 'Value' property and using the SetValue() method.This seems to set the value visually on page, but when I click my save button and use the corrosponding sldProbability.GetValue() it returns Int.MinValue if the slider has not been moved by the user. (If the slider has been moved by the user then the value is reported within the range I'd expect 0-100.
Am I using the incorrect method to set the value here? or retrieve it? feels like I'm doing something wrong but slightly unsure what, any thoughts?
Many thanks,
Doug
Last edited by Daniil; Jul 19, 2012 at 3:44 PM.
Reason: [CLOSED]