BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
SfDataGrid.SelectionChanged
SfDataGrid.SelectedItems
SfDataGrid.SelectionController.SelectedRows
Hi Emanuele,
Thank you for contacting Syncfusion support.
We have analyzed your query. Please refer the following updates.
Query |
Response | |
Getting SelectedItem in master details view by using SelectionChanged event. |
You can achieve your requirement by using SelectionChanged event of details grid. Please refer the code snippet and sample in the following location: Code Snippet:
| |
There are some limitations in Master-Details View. ... - It does not have support to bind SelectedItem, CurrentItem. ... Here it says that it is not possible to do a binding; but is it possible to deal with selected items in some way, also programmatically (in C# code)? |
In details view grid you can’t able to bind the SelectedItem and CurrentItem. But, you can achieve this by using Behaviour and Dependency Property.
Please refer the code snippet and sample in the following location:
Code Snippet:
|
Sample Location: SfDataGrid_MasterDetailsView.zip
Regards,
Farjana Parveen A
Hi Emanuele,
Thank you for your update. Please let us know if you require further assistance on this.
Regards,
Farjana Parveen A
Hi Emanuele,
Thank you for contacting Syncfusion support.
We have analyzed your query. Please refer the following updates.
Query
Response
Getting SelectedItem in master details view by using SelectionChanged event.
You can achieve your requirement by using SelectionChanged event of details grid.
Please refer the code snippet and sample in the following location:
Code Snippet:
void FirstDetailsViewGrid_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e)
{
var grid = (e.OriginalSender as DetailsViewDataGrid);
var selectedrows = grid.SelectionController.SelectedRows;
var selecteditems = grid.SelectedItems;
}
There are some limitations in Master-Details View.
...
- It does not have support to bind SelectedItem, CurrentItem.
...
Here it says that it is not possible to do a binding; but is it possible to deal with selected items in some way, also programmatically (in C# code)?
In details view grid you can’t able to bind the SelectedItem and CurrentItem. But, you can achieve this by using Behaviour and Dependency Property.
Please refer the code snippet and sample in the following location:
Code Snippet:
<local:SelectionBehaviour FirstDetailsViewSelectedItem="{Binding SelectedFirstNestedGridOrderDetails, Mode=TwoWay}"
FirstNestedSelectedItems="{Binding FirstNestedGridSelectedItems , Mode=TwoWay}"
FirstNestedCurrentItem="{Binding FirstNestedCurrentDetails,Mode=TwoWay}"/>
Sample Location: SfDataGrid_MasterDetailsView.zip
Regards,
Farjana Parveen A