May 15, 2013, 9:37 AM
Migration Ext.Net1.x to Ext.Net 2.x - SelectBox .getValue() method undefined ?
Hi,
I am migrating our Application from Ext .Net 1.x to Ext .Net 2.2.
Basically I have a SelectBox and a javascript part that retrieve the SelectBox value. Everything is properly working on Ext .Net 1.x but in Ext .Net 2.2 the js method mySelectBox.getValue() is undefined.
Here my SelectBox:
UPDATE: Sorry, after some spent in investigation I discovered that I should use App.cboYears.getValue() ...
I am migrating our Application from Ext .Net 1.x to Ext .Net 2.2.
Basically I have a SelectBox and a javascript part that retrieve the SelectBox value. Everything is properly working on Ext .Net 1.x but in Ext .Net 2.2 the js method mySelectBox.getValue() is undefined.
Here my SelectBox:
<ext:SelectBox
ID="cboYears"
runat="server"
HiddenName="RecurringSystem"
Editable="false"
AllowBlank="false"
Width="70"
ListWidth="60">
<Listeners>
<Select Handler="#{dsCalendar}.load();" />
</Listeners>
</ext:SelectBox>
Here my js var getSelectedYear = function () {
debugger;
var value = cboYears.getValue();
if (!value) {
...
}
return parseInt(value);
};
And of course, when is getSelectedYear executed? Here:<ext:Store ID="dsCalendar" runat="server" RemoteSort="true" AutoLoad="true">
...
<Parameters>
<ext:StoreParameter Name="year" Value="getSelectedYear()" Mode="Raw" />
<ext:StoreParameter Name="locationId" Value="getSelectedLocation()" Mode="Raw" />
</Parameters>
...
You can see the issue I am experiencing into attached screenshot.UPDATE: Sorry, after some spent in investigation I discovered that I should use App.cboYears.getValue() ...
Last edited by MarzioPat; May 15, 2013 at 10:08 AM.