Set SelectedValue of ComboBox
-
Hi All, I have combobox with name cmbClassId. I have to set the SelectedValue for this combo with the value form the DataTable Cell value. I have done it like below.
cmbClassId.SelectedValue = (object)dataSet.Tables[Constants.STUDENT].Rows[0]["StudentClassId"];
but still it is showing me null in SelectedValue property of this combo... please help me out... Thanks & Regards Dipak Thesiya
dipak
-
Hi All, I have combobox with name cmbClassId. I have to set the SelectedValue for this combo with the value form the DataTable Cell value. I have done it like below.
cmbClassId.SelectedValue = (object)dataSet.Tables[Constants.STUDENT].Rows[0]["StudentClassId"];
but still it is showing me null in SelectedValue property of this combo... please help me out... Thanks & Regards Dipak Thesiya
dipak
-
Try with SelectedItem property.It seem's that the property doesn't works fine ^.
Life is a stage and we are all actors!
modified on Wednesday, August 19, 2009 6:47 AM
i am supposed work with SelectedValue Property....
dipak
-
Hi All, I have combobox with name cmbClassId. I have to set the SelectedValue for this combo with the value form the DataTable Cell value. I have done it like below.
cmbClassId.SelectedValue = (object)dataSet.Tables[Constants.STUDENT].Rows[0]["StudentClassId"];
but still it is showing me null in SelectedValue property of this combo... please help me out... Thanks & Regards Dipak Thesiya
dipak