Sorry if this has been covered before...
I'm using VS2008 and the Entity Framework DataModel.
I have some fields in the database that are just strings saying "True" or "False". There are about 15 or so entries for each field. I can't do a databaind on the fields because I end up with 15 or so trues and falses in the drop down. So I decided that I'd like to use the <Items><...RadComboBoxItem> instead to display the choices. My problem is that I can't pull out the correct data from the database for the respective fields.
Example:
I have one field called 'Half Year Interest' and the data is "False".
My code behind is
this.halfYearInterestGroup9RadComboBox.Text=study.DataModel.Half_Year_Interest9;
My aspx code is
It is pulling up the default empty string instead of "False".
It feels like there is some connection piece missing somewhere, like the combobox isn't receiving data from the database somehow. BUT... When I run the program and put breakpoints on the backend, I hover over the fields and see the correct data... I just then don't see it on the aspx side when it's completed running.
My question is this: How can I pull up the correct data from the database and still use the Item Selections from the aspx page?
Any help would be greatly appreciated.
Thanks!
wen
I'm using VS2008 and the Entity Framework DataModel.
I have some fields in the database that are just strings saying "True" or "False". There are about 15 or so entries for each field. I can't do a databaind on the fields because I end up with 15 or so trues and falses in the drop down. So I decided that I'd like to use the <Items><...RadComboBoxItem> instead to display the choices. My problem is that I can't pull out the correct data from the database for the respective fields.
Example:
I have one field called 'Half Year Interest' and the data is "False".
My code behind is
this.halfYearInterestGroup9RadComboBox.Text=study.DataModel.Half_Year_Interest9;
My aspx code is
<telerik:RadComboBox ID="halfYearInterestGroup9RadComboBox" runat="server" Width="200px" |
style="left: 662px; top: 350px; position: absolute; text-align: right;"> |
<Items> |
<telerik:RadComboBoxItem Text="" Value="" /> |
<telerik:RadComboBoxItem Text="True" Value="True" /> |
<telerik:RadComboBoxItem Text="False" Value="False" /> |
</Items> |
</telerik:RadComboBox> |
It feels like there is some connection piece missing somewhere, like the combobox isn't receiving data from the database somehow. BUT... When I run the program and put breakpoints on the backend, I hover over the fields and see the correct data... I just then don't see it on the aspx side when it's completed running.
My question is this: How can I pull up the correct data from the database and still use the Item Selections from the aspx page?
Any help would be greatly appreciated.
Thanks!
wen