Problem with Enum and dropdownlist
-
Hi I have a dropdown list, and the values displayed in this come from an enum, which on load of the page I cast to an array and then bind to the dropdown list. The dropdown list is itself part of a details view. When the user selects a value this selected value is saved to the database via an object, which has a property of that enum type. The object is bound using Microsoft Object Container Data Source for the rest of the details view, but of course the dropdown list is bound using the array. However, where am I stuck is when the user wants to edit a record, of course I want to show this record in the details view. Now I can show all the other fields in the detailsview using the Object Container Data Source, which also includes the value that the user selected from the drop down list when the record was entered. How do I set the drop down list to a value from the Object Container Data Source where the drop down list is bound to an enum/array? Thanks
-
Hi I have a dropdown list, and the values displayed in this come from an enum, which on load of the page I cast to an array and then bind to the dropdown list. The dropdown list is itself part of a details view. When the user selects a value this selected value is saved to the database via an object, which has a property of that enum type. The object is bound using Microsoft Object Container Data Source for the rest of the details view, but of course the dropdown list is bound using the array. However, where am I stuck is when the user wants to edit a record, of course I want to show this record in the details view. Now I can show all the other fields in the detailsview using the Object Container Data Source, which also includes the value that the user selected from the drop down list when the record was entered. How do I set the drop down list to a value from the Object Container Data Source where the drop down list is bound to an enum/array? Thanks