Reputation: 5
i cannot bind the table name in datagrid. its not accepting the ampersand (&) table name in xaml.
here is the code.
<DataGrid x:Name="TOTAL_DATAGRID" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ColumnWidth="80" Margin="54,113,62,114"> <DataGrid.Columns> <DataGridTextColumn Header="Kiln_TotalKWh" Binding="{Binding Energy_KILN_HOUR_Total_kiln&cooler_KWH_Value}" Width="80" /> < /DataGrid.Columns> </DataGrid>
Upvotes: 0
Views: 253
Reputation:
You can replace ampersand with &
in XAML
update from comments
Binding Path is to link XAML with the corresponding ViewModel Property. You can't need an ampersand there.
If what you are doing is like databinding using database then you can rename the column name in the select with the AS
keyword
Upvotes: 4