Nov 28, 2013, 8:42 AM
[CLOSED] Get Selected Combo Box without selected first
Hai..
I have some case here. I create Form Edit using a combobox field.When i try to edit the form without change anything in combox, the return value from combobox is the text that display in combobox field but if i do a change combobox the value is return 1 or 0. My combo box value i set to 1 and 0 and the text value is something text. i attachment image above about my problem.
This is my formpanel script aspx :
Regards,
Redi
I have some case here. I create Form Edit using a combobox field.When i try to edit the form without change anything in combox, the return value from combobox is the text that display in combobox field but if i do a change combobox the value is return 1 or 0. My combo box value i set to 1 and 0 and the text value is something text. i attachment image above about my problem.
This is my formpanel script aspx :
<ext:FormPanel ID="frmPanel1"
runat="server"
Title="Personal Data"
BodyPadding="10"
Layout="FormLayout">
<Defaults>
<ext:Parameter Name="LabelWidth" Value="75" Mode="Raw" />
</Defaults>
<Items>
<ext:TextField ID="txtName" runat="server" FieldLabel="Name" AllowBlank="false" />
<ext:TextField ID="txtRFID" runat="server" FieldLabel="RFID" AllowBlank="false" />
<ext:ComboBox ID="type"
runat="server"
Name="type"
EmptyText="Select Type..."
FieldLabel="Type" ForceSelection="false">
<Items>
<ext:ListItem Text="Operator" Value="1" />
<ext:ListItem Text="Mechanic" Value="0" />
</Items>
</ext:ComboBox>
<ext:Checkbox ID="active" runat="server" FieldLabel="Active ? " />
<ext:TextField ID="txtSMUHours" runat="server" FieldLabel="SMU Hours" />
</Items>
</ext:FormPanel>
And this is the form data come in code behind :Dim employeeID As String = e.ExtraParams("SN")
Dim ds As New DataSet
ds = BL.blFMGetOperatorSelect(Me.Session("AuthState"), employeeID)
For i = 0 To ds.Tables(0).Rows.Count - 1
With ds.Tables(0).Rows(i)
txtName.Text = .Item(1)
txtRFID.Text = .Item(4)
type.SetValue(.Item(2)) <--- combo box value from
If (.Item(3)) Then
active.Checked = True
Else
active.Checked = False
End If
txtSMUHours.Text = .Item(10)
End With
Next
thanks for your attention and support.Regards,
Redi
Last edited by Daniil; Dec 03, 2013 at 12:50 PM.
Reason: [CLOSED]