Home Forums WPF controls Xceed DataGrid for WPF Virtual data add/update/delete

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • iferry
    Participant
    Post count: 2
    #43871 |

    Does the grid support adding / editing / removing entries when in “virtualized data” mode?
    Is there a demo on how to achieve this?
    Thanks

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi,

    For detailed information regarding data virtulization, you may refer to the “DataVirtualization” sample project which comes along with the Xceed package and should be located, by default, at the following path on your machine:

    C:\Xceed Samples\Xceed DataGrid for WPF Professional Edition v5.9\CSharp\DataVirtualization

    You may also refer to the following link on our documentation center for information in this regard.

    iferry
    Participant
    Post count: 2

    Hi,

    Thanks for your answer.
    Anyway, it seems that the collection behind data virtualization does not support adding and deleting items.
    Is this correct?

    Thanks.

    Diane [Xceed]
    Moderator
    Post count: 1353

    The DataGridCollectionViewBase class includes public events that let you capture when the user made changes (add/delete/modify) to the grid. In those events, it is up to you to push those changes to your database.

    For example:

    <xcdg:DataGridVirtualizingCollectionView x:Key="mySource" 
                                             ItemRemoved="VirtualizingCollectionView_ItemRemoved" />
    
    private void VirtualizingCollectionView_ItemRemoved(object sender, DataGridItemRemovedEventArgs e)
    {
        // your custom code here
    }

    Reference:
    http://forums.xceed.com/wp-content/documentation/xceed-datagrid-for-wpf/webframe.html#Xceed.Wpf.DataGrid.v5.9~Xceed.Wpf.DataGrid.DataGridCollectionViewBase_members.html

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