This is a migrated thread and some comments may be shown as answers.

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

1 Answer 123 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Selvakumar
Top achievements
Rank 1
Selvakumar asked on 13 Sep 2016, 04:16 PM
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

1 Answer, 1 is accepted

Sort by
0
Selvakumar
Top achievements
Rank 1
answered on 13 Sep 2016, 07:53 PM

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>

Tags
GridView
Asked by
Selvakumar
Top achievements
Rank 1
Answers by
Selvakumar
Top achievements
Rank 1
Share this question
or