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

Need sample code for Selected Items

1 Answer 35 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ted
Top achievements
Rank 1
Ted asked on 16 Apr 2012, 08:05 PM
Here is my xaml for a RadGridView with a GridViewSelectColumn:

<telerik:RadGridView x:Name="ItemsGridView"
                     telerik:StyleManager.Theme="Summer"
                     ItemsSource="{Binding Items}"
                     ShowGroupPanel="False"
                     RowIndicatorVisibility="Collapsed"
                     Visibility="{Binding ItemsGridVisibility}"
                     AutoGenerateColumns="False"
                     Grid.Row="2"
                     SelectionMode="Extended" >
    <telerik:RadGridView.Columns>
        <telerik:GridViewSelectColumn />
        <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}">
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="Nomenclature" DataMemberBinding="{Binding Description}">
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

In my VIEWMODEL, I catch an OnButtonClick command and I want to act on the rows that are Selected.

What VB code do I need to build a list of the "ID's" of the rows that are Selected?

Many thanks,

Ted

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 17 Apr 2012, 12:59 PM
Hello Ted,

 
I would recommend you to check this forum thread. There you will find a sample project illustrating how you can bind to the SelectedItems property of the RadGridView.  

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Ted
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or