Apr 02, 2012, 12:18 PM
Problem setting SelectedItem.Value in combobox v2.0
Hello!
After convert an application to version 2.0 I'm having problem to set a particular value to a combobox. When I try to set a value I received a message about Object Instance null exception (System.NullReferenceException).
My combobox code:
After convert an application to version 2.0 I'm having problem to set a particular value to a combobox. When I try to set a value I received a message about Object Instance null exception (System.NullReferenceException).
My combobox code:
<ext:ComboBox ID="dbAtivo" runat="server" Editable="false" Height="20px"
FieldLabel="Ativo" Width="300px" ReadOnly="true" >
<Items>
<ext:ListItem Text="Yes" Value="Y" />
<ext:ListItem Text="No" Value="N" />
</Items>
</ext:ComboBox>
Code to set a value from database: dbAtivo.SelectedItem.Value = drSql.GetString(4);
Thanks in advance!