This question is locked. New answers and comments are not allowed.
I have several combo boxes in a grid. The combo boxes often (but not always) appear empty until I click on them. Once I click on a combo box, the correct data appears in the combo box. Whether a combo box appears empty or has correct data seems to be completely random. I DO NOT use a View Model nor do I use MVVM. The item source for my grid is set at run-time through an observable collection in the code-behind of the view. The observable collection is filled through a web service, which connects to a SQL server database.
I know this is not the ideal way to do things, but I don't have time to change to a standard view model system, or a MVVM system. Refreshing the webpage will completely change which combo boxes are empty. I do not set the grid item source nor the comboBox item sources at design time. I set the item sources for the grid and the comboboxes at runtime, using the following:
Grid item source (productVersions is an observable collection) :
uiProductVersions.ItemsSource = productVersions;
ComboBox item source (resources is an observable collection) :
I set the other properties of the combo box at design time:
How can I get the combo boxes of my grid to all show the correct data each time the webpage loads, instead of having random combo boxes showing the correct data, and other combo boxes showing empty data? Switching to a view model or MVVM system is not an option.
I know this is not the ideal way to do things, but I don't have time to change to a standard view model system, or a MVVM system. Refreshing the webpage will completely change which combo boxes are empty. I do not set the grid item source nor the comboBox item sources at design time. I set the item sources for the grid and the comboboxes at runtime, using the following:
Grid item source (productVersions is an observable collection) :
uiProductVersions.ItemsSource = productVersions;
ComboBox item source (resources is an observable collection) :
private void uiProductVersions_DataLoaded(object sender, EventArgs e){(GridViewComboBoxColumn)uiProductVersions.Columns["uiOwnerWwid"]).ItemsSource=resources;}I set the other properties of the combo box at design time:
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ownerWwid, Mode=TwoWay}" DisplayMemberPath="name" SelectedValueMemberPath="value" Header="Owner" x:Name="uiOwnerWwid" UniqueName="uiOwnerWwid" />How can I get the combo boxes of my grid to all show the correct data each time the webpage loads, instead of having random combo boxes showing the correct data, and other combo boxes showing empty data? Switching to a view model or MVVM system is not an option.