Home Forums WPF controls Xceed DataGrid for WPF Refresh when data changes

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24612 |

    Does DataGrid have a refresh method of some sort? I’m changing the datasource, but don’t see the changes on the page until I switch to a different TabItem and back again. (The DataGrid is on 1 of 3 TabItems in a TabControl).

    Thanks!

    Imported from legacy forums. Posted by Brian (had 523 views)

    Xceed Support
    Member
    Post count: 5658

    The DataGridControl should be refreshing automatically when its ItemsSource changes…

    If you can provide more details on how you are binding your DataGridControl to the data source and how you are changing it, I could help you determine what is going wrong.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 310 views)

    User (Old forums)
    Member
    Post count: 23064

    Here is my DataGrid declaration:

    ——————————————————–
    <xcdg:DataGridControl x:Name=”ChargesGrid”
    CellEditorDisplayConditions=”MouseOverCell”
    EditTriggers=”BeginEditCommand,ActivationGesture”
    ItemScrollingBehavior=”Immediate” AutoCreateColumns=”False”
    View=”TableView.Luna.Metallic”
    DataContext=”{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=FundOrder,Mode=TwoWay}”
    ItemsSource=”{Binding Path=FundOrderDetail}”
    Margin=”13,46.31,0,14.379″
    HorizontalAlignment=”Left” Width=”408.495″
    FontSize=”10″
    >

    ——————————————————–

    FundOrderDetail is a LINQ EntitySet. I’m pretty sure Change Notification is working because I can switch tabs and the datagrid repopulates. It just doesn’t do it automatically.

    Brian

    Imported from legacy forums. Posted by Brian (had 459 views)

    Xceed Support
    Member
    Post count: 5658

    In a TabControl, the TabItems get loaded/unloaded when you are switching tabs… Can you confirm that the FundOrder and FundOrderDetails properties are implementing INotifyPropertyChanged or are DependencyProperties?

    Imported from legacy forums. Posted by Marcus [Xceed] (had 230 views)

    User (Old forums)
    Member
    Post count: 23064

    SQLMetal generated the FundOrder and FundOrderDetails objects. I don’t have issues with change notification in other places, but maybe this instance is different because I’m binding to a child.

    I have Vanguard for DataGrid. I’ll email a sample project to support and reference this post.

    Brian

    Imported from legacy forums. Posted by Brian (had 4194 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.