Get multiple selected rows in SelectedItem Property

3 posts, 0 answers
  1. mal
    mal avatar
    6 posts
    Member since:
    Dec 2010

    Posted 13 Dec 2010 Link to this post

    I am using Telerik datagrid and I have GridViewSelect Column. Since I am using MVVM, I am binding the "SelectedItem" property as shown below.

     

     

     

    <DataGrid:DynamicDataGrid Grid.Row="0" ItemsSource="{Binding DataGridItemSource}" SelectionMode="Extended" SelectedItem="{Binding DataGridSelectedItem, Mode=TwoWay}" >

     

     

     

     

    <DataGrid:DynamicDataGrid.Columns>
    <telerik:GridViewSelectColumn></telerik:GridViewSelectColumn>
    </DataGrid:DynamicDataGrid.Columns>
    </DataGrid:DynamicDataGrid>

    In my ViewModel I am accessing the SelectedItem as shown below

     

     

     

    /// <summary>
    /// Gets or Sets the DataGridSelecteditem Property
    /// </summary>

     

     

     

     

     

     

     

    public string DataGridSelectedItem
    {

     

     

     

    get

     

     

     

     

     

    {

     

     

    return this.dataGridSelectedItem;

     

    }

     

     

    set

     

     

     

     

     

    {

     

     

    this.dataGridSelectedItem = value;

     

     

     

    this.NotifyPropertyChanged("DataGridSelectedItem");

     

    }

    }

    My Question is, how do I get the Values of all the items that are selected in my GridView??

    Thanks

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 14 Dec 2010 Link to this post

    Hi mal,

    You may use the SelectedItems collection of the RadGridView.  

    Greetings,
    Maya
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Fedor
    Fedor avatar
    1 posts
    Member since:
    Jan 2013

    Posted 03 Jan 2013 Link to this post

    But RadGridView does not appear to have a "SelectedItems" property. Only a "SelectedItem" property. I get a XAML parser error in any case, when trying the former. 
Back to Top