We populated radComboBox in page_load method once it not from post back. When the user click a button and we will read selected item using following code
cmbCustAcctNo.SelectedItem.Text
However, we got object null reference because SelectedItem is null. We have verified EnableLoadOnDemand = false and AllowCustomText = false. Do we miss anything?
version: 2008.2.826.35
cmbCustAcctNo.SelectedItem.Text
However, we got object null reference because SelectedItem is null. We have verified EnableLoadOnDemand = false and AllowCustomText = false. Do we miss anything?
version: 2008.2.826.35
<
telerik:RadComboBox
ID
=
"cmbCustAcctNo"
Width
=
"128px"
runat
=
"server"
Skin
=
"Office2007"
CausesValidation
=
"false"
AutoPostBack
=
"true"
ToolTip
=
"Select Account Number"
onselectedindexchanged
=
"cmbCustAcctNo_SelectedIndexChanged"
>
</
telerik:RadComboBox
>
IList<prcWebAccountsForUserResult> listOfAcctNo = accountNumbers.ToList();
cmbCustAcctNo.DataSource = listOfAcctNo;
cmbCustAcctNo.DataTextField =
"AccountNumber"
;
cmbCustAcctNo.DataValueField =
"AccountNumber"
;
cmbCustAcctNo.DataBind();