How to Pass filtered grid view collection to view model using delegate command

2 posts, 0 answers
  1. SELVAKUMAR
    SELVAKUMAR avatar
    4 posts
    Member since:
    Mar 2016

    Posted 13 Sep Link to this post

    Hi All,

    I have a requirement to get the data from telerik radgridview and pass it to view model for manipulation.  The data in the grid may be after filtering/sorting/pagination and I want to get the collection from the grid that is presently in the grid and sent it to delegate command for operation.  I have placed a button to call Approve delegate command and I want to pass the gridview collection to the particular delegate method.

    Can any one help me how can I pass filtered grid view collection to view model command?


    <Button Height="30" Width="30" Margin="1,0,0,0" ToolTip="Approve" Command="{Binding Approve}" Cursor="Hand"></Button>

    <telerik:RadGridView x:Name="GridView">
    ....
    ....
    </telerik:RadGridView>

    <telerik:RadDataPager Margin="5,0,15,0" x:Name="GridviewPager" Source="{Binding Items, ElementName=GridView}" PageSize="33" />

    Thanks
    Selvakumar R
  2. SELVAKUMAR
    SELVAKUMAR avatar
    4 posts
    Member since:
    Mar 2016

    Posted 13 Sep in reply to SELVAKUMAR Link to this post

    This issue got fixed, I send data parameter as grid view items...

    <Button Height="30" Width="30" Margin="1,0,0,0" ToolTip="Approve"
    Command="{Binding ApproveCommand}"
                            CommandParameter="{Binding ElementName=BuyOutsGridView, Path=Items}"
                            Cursor="Hand" VerticalAlignment="Top">
    </Button>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top