I'm not sure if this has something to do with the Async calls or what, but here's the situation.
I have two tables in my database, DB1 and DB2. Here's the schema:
DB1
ARecordID
ARecord
AIsActive
DB2
BRecordID
ARecordID (foreign key)
BRecord
BFeedIdentifier
BIsActive
My XAML:
First off, all the data is binding fine. However, I'm experiencing a little quirk. When the page first renders, all the data is displayed EXCEPT the bound items for the GridViewComboBoxColumn. However, once I click on the one of the records in the GridViewComboBoxColumn, the entire column shows all the correctly bound data.
I've tried multiple things like Column.Refresh after the grid has loaded. I've tried setting the grid's datasource's AutoLoad to false and then upon recordsADomainDataSource load, call recordsBDomainDataSource.Load(). I've tried a few other things, but to no avail.
How do I get the GridViewComboBoxColumn to show the data automatically on load without having to click on it?
Thanks,
Joshua
I have two tables in my database, DB1 and DB2. Here's the schema:
DB1
ARecordID
ARecord
AIsActive
DB2
BRecordID
ARecordID (foreign key)
BRecord
BFeedIdentifier
BIsActive
My XAML:
<
riaControls:DomainDataSource
AutoLoad
=
"True"
d:DesignData
=
"{d:DesignInstance MyApp:RecordsA, CreateList=True}"
Height
=
"0"
LoadedData
=
"recordsADomainDataSource_LoadedData"
Name
=
"recordsADomainDataSource"
QueryName
=
"GetRecordsA"
Width
=
"0"
>
<
riaControls:DomainDataSource.DomainContext
>
<
MyApp:MyAppContext
/>
</
riaControls:DomainDataSource.DomainContext
>
</
riaControls:DomainDataSource
>
<
riaControls:DomainDataSource
AutoLoad
=
"True"
d:DesignData
=
"{d:DesignInstance MyApp:RecordsB, CreateList=True}"
Height
=
"0"
LoadedData
=
"recordsBDomainDataSource_LoadedData"
Name
=
"recordsBDomainDataSource"
QueryName
=
"GetRecordsB"
Width
=
"0"
>
<
riaControls:DomainDataSource.DomainContext
>
<
MyApp:MyAppContext
/>
</
riaControls:DomainDataSource.DomainContext
>
</
riaControls:DomainDataSource
>
<
telerik:RadGridView
HorizontalAlignment
=
"Left"
Name
=
"rgvRecords"
VerticalAlignment
=
"Top"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
CanUserDeleteRows
=
"True"
ShowInsertRow
=
"True"
CanUserReorderColumns
=
"False"
CanUserResizeColumns
=
"False"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
ItemsSource
=
"{Binding ElementName=recordsBDomainDataSource, Path=Data}"
IsBusy
=
"{Binding IsBusy, ElementName=recordsBDomainDataSource}"
Deleted
=
"rgvRecords_Deleted"
Margin
=
"0,50,0,0"
RowEditEnded
=
"rgvRecords_RowEditEnded"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
""
Width
=
"75"
IsFilterable
=
"False"
IsReadOnly
=
"True"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadButton
Margin
=
"5"
Command
=
"telerik:RadGridViewCommands.Delete"
CommandParameter
=
"{Binding}"
>Delete</
telerik:RadButton
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewComboBoxColumn
Width
=
"200"
Header
=
"A Record"
DataMemberBinding
=
"{Binding ARecordID, Mode=TwoWay}"
ItemsSource
=
"{Binding ElementName=recordsADomainDataSource, Path=Data}"
SelectedValueMemberPath
=
"ARecordID"
DisplayMemberPath
=
"ARecord"
>
</
telerik:GridViewComboBoxColumn
>
<
telerik:GridViewDataColumn
Header
=
"B Record"
DataMemberBinding
=
"{Binding BRecord, Mode=TwoWay}"
Width
=
"*"
IsFilterable
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"B Feed Identifier"
DataMemberBinding
=
"{Binding BFeedIdentifier, Mode=TwoWay}"
Width
=
"*"
IsFilterable
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Active"
DataMemberBinding
=
"{Binding BIsActive, Mode=TwoWay}"
Width
=
"150"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
Click
=
"CheckBox_Click"
IsChecked
=
"{Binding BIsActive, Mode=TwoWay}"
IsEnabled
=
"True"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
First off, all the data is binding fine. However, I'm experiencing a little quirk. When the page first renders, all the data is displayed EXCEPT the bound items for the GridViewComboBoxColumn. However, once I click on the one of the records in the GridViewComboBoxColumn, the entire column shows all the correctly bound data.
I've tried multiple things like Column.Refresh after the grid has loaded. I've tried setting the grid's datasource's AutoLoad to false and then upon recordsADomainDataSource load, call recordsBDomainDataSource.Load(). I've tried a few other things, but to no avail.
How do I get the GridViewComboBoxColumn to show the data automatically on load without having to click on it?
Thanks,
Joshua