Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
SelectedItem property
posted

Does XamGrid has SelectedItem property like Silverlight DataGrid.

For example if i have a DataGrid named myDataGrid, then when I want to get a selected row from Silverlight DataGrid all have to do is call SelectedItem property then cast it to a data object

(MyObject) selectedRow = (myObject) mtDataGrid.SelectedItem.

Thanks

 

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    The xamGrid doesn't have a SelectedItem property. 

    It has an ActiveCell property, which you can get your data item by using : 
    grid.ActiveCell.Row.Data

    And it also has SelectedRows/SelectedCells properties. Which are used based of the type of Selection you're using:

    grid.SelectionSettings.SelectedCells

    grid.SelectionSettings.SelectedRows

    -SteveZ

Children