I have a RadComboBox that is bounded by a datasource. I set the datacource to select from a the database using a select query. Run I run the project, I get a complete list of items in the RadComboBox.
I want to set the RadComboBox to a selected value, or index in the codebehind. So the RadComboBox will have a value in it once the page is load, instead of it being empty.
I have tried to do this with the code like so:
RadComboBoxItem item = RCB_PO_NUM.FindItemByText("2000");
item.Selected = true;
But I get a null value in the debugger once I run the program. I have tried to put the code in the Page_Load
, Page_LoadComplete
, and Page_Init
methods. It still comes back as an null value. Can some please tell me where I should put the code, so that it will not return a null value?