Hello,
I would like to know if its possible to bind multiple datatables to a single RadGridView? I need to bind a datatable to populate the grid and beside that I would also like to bind the column header properties.
xaml
cs
The second binding overrides the first binding. Any suggestion to bind both are welcome
Kind regards,
Dennis
I would like to know if its possible to bind multiple datatables to a single RadGridView? I need to bind a datatable to populate the grid and beside that I would also like to bind the column header properties.
xaml
<
telerik:RadGridView
Margin
=
"0"
AlternationCount
=
"2"
AlternateRowBackground
=
"#d7e8ff"
AreRowDetailsFrozen
=
"True"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
IsReadOnly
=
"True"
ItemsSource
=
"{Binding}"
SelectionMode
=
"Single"
ShowInsertRow
=
"False"
RowHeight
=
"30"
RowIndicatorVisibility
=
"Collapsed"
telerik:StyleManager.Theme
=
"Office_Blue"
x:Name
=
"Listing"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"ID"
DataMemberBinding
=
"{Binding Path=vis_ID}"
IsVisible
=
"False"
Footer
=
"Test"
/>
<
telerik:GridViewDataColumn
Header
=
"{Binding [str_gridview_lastname]}"
MinWidth
=
"150"
DataMemberBinding
=
"{Binding Path=vis_lastname}"
></
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
cs
// Bind datatable to populate grid
Listing.DataContext = myDataTable;
// Bind column header text properties
Listing.DataContext = myColHeaderTable;
The second binding overrides the first binding. Any suggestion to bind both are welcome
Kind regards,
Dennis