I am working with Grid
control of DevExpress WPF
and got an issue. You guys please help me.
I have a Grid
which bind data from ViewModel
. The ViewModel
is working perfectly. I can query the data and push them to View
. The issue is I can load the data but they don't display in Grid
even I can CRUD them.
This is my demo.
Here is my code:
<dxg:GridControl Name="ResItemGridControl"
ItemsSource="{
Binding ItemTypeList,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
AutoPopulateColumns="False">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="ItemCode"
Header="Code"
DisplayMemberBinding="{Binding ItemCode, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<dxg:GridColumn FieldName="ItemName"
Header="Name"
DisplayMemberBinding="{Binding ItemName, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView Name="ResItemTableView"
ShowGroupPanel="False"
MultiSelectMode="None" NavigationStyle="Row"
FocusedRow="{Binding SelectedItem,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" />
</dxg:GridControl.View>
</dxg:GridControl>