row selection on sfdatagrid grouping
Hello,
Thibault
I'm using a datagrid in my UWP Application , which opens a dialogbox when a row is clicked (ie on row selection). my problem is that when I want to use grouping, a row is automatically selected when grouping, then a dialogbox is opened (while the row is not clicked). How to prevent from row selection when grouping?
The other problem is datagrid loading performance. My test collection contains only six items (to be displayed on six rows) and the page takes 8 seconds to be created with only a sfdatagrid inside. Do you intend to improve that point?
Thanks for your help.
Regards,
Thibault
SIGN IN To post a reply.
1 Reply
JS
Jayapradha S
Syncfusion Team
February 9, 2016 12:29 PM UTC
Hi Thibault,
Thank you for contacting Syncfusion support.
You can avoid the row selection while doing grouping in SfDataGrid by using SfDataGrid.ClearSelections(bool exceptCurrentRow) method. To clear selection while grouping, you need to customize the GridSelectionController and override the ProcessOnGroupChanged method as shown in the below code example:
Code Example:
Find the sample from the below location:
Sample Link: http://www.syncfusion.com/downloads/support/forum/121915/ze/Grouping_SfDataGrid-1197625413
Regarding Query: other problem is datagrid loading performance. My test collection contains only six items(to be displayed on six rows) and the page takes 8 seconds to be created with only a sfdatagrid inside. Do you intend to improve that point?
We have analyzed the loading performance of our sfdatagrid with six rows and we didn’t find the performance delay in our control. Have checked your reported case and empty page has taken 4-5 secs to load. Our SfDataGrid loads, once the page getting displayed. Still, this issue persists at your end then please share some more details.
Performance Metrics of SfDataGrid in UWP:
We have prepared a sample and loaded the SfDataGrid in button click. This took 1sec to appear in page. Find the sample from the below location,
Sample Link: http://www.syncfusion.com/downloads/support/forum/121915/ze/LoadingPerformance_SfDataGrid-1432295075
Please let us know if you have any query.
Regards,
Jayapradha
Thank you for contacting Syncfusion support.
You can avoid the row selection while doing grouping in SfDataGrid by using SfDataGrid.ClearSelections(bool exceptCurrentRow) method. To clear selection while grouping, you need to customize the GridSelectionController and override the ProcessOnGroupChanged method as shown in the below code example:
Code Example:
|
public MainPage() { this.InitializeComponent(); sfgrid.SelectionController = new GridSelectionControllerExt(sfgrid); }
public class GridSelectionControllerExt : GridSelectionController { SfDataGrid dataGrid; public GridSelectionControllerExt(SfDataGrid grid) : base(grid) { dataGrid = grid; }
protected override void ProcessOnGroupChanged(NotifyCollectionChangedEventArgs args) { if (dataGrid.SelectionMode == GridSelectionMode.None) return; else dataGrid.ClearSelections(false); } |
Find the sample from the below location:
Sample Link: http://www.syncfusion.com/downloads/support/forum/121915/ze/Grouping_SfDataGrid-1197625413
Regarding Query: other problem is datagrid loading performance. My test collection contains only six items(to be displayed on six rows) and the page takes 8 seconds to be created with only a sfdatagrid inside. Do you intend to improve that point?
We have analyzed the loading performance of our sfdatagrid with six rows and we didn’t find the performance delay in our control. Have checked your reported case and empty page has taken 4-5 secs to load. Our SfDataGrid loads, once the page getting displayed. Still, this issue persists at your end then please share some more details.
Performance Metrics of SfDataGrid in UWP:
|
S.No |
Page Loading Time with SfDataGrid |
SfDataGrid loading time (SfDataGrid loaded at runtime) |
|
1 |
4-5 secs |
1sec |
We have prepared a sample and loaded the SfDataGrid in button click. This took 1sec to appear in page. Find the sample from the below location,
Sample Link: http://www.syncfusion.com/downloads/support/forum/121915/ze/LoadingPerformance_SfDataGrid-1432295075
Please let us know if you have any query.
Regards,
Jayapradha
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
TH Thibault
- Feb 8, 2016 02:04 PM UTC
- Feb 9, 2016 12:29 PM UTC