Thread ID:

Created:

Updated:

Platform:

Replies:

I am using a GridGroupingControl bound to a strongly-typed entity collection as the datasource; the grid is set up as "TableOptions.ListBoxSelectionMode = SelectionMode.One". I have several columns sorted by default on the grid, and changes to the data generally result in a sort and re-display of the data, albeit with some UI issues.

I have attached a sample to facilitate reproducing my issues. Please reload the form when attempting to replicate, as the steps assume a fresh instance.

Notice that both Row 4 (which has moved into position 5) and Row 3 (which has moved into position 4) are selected. I would like only Row 4 to maintain selection. I can achieve partial results by handling the "SelectedRecordsChanging" event and cancelling when appropriate, but the CurrentCell is moving off of the selected row.

Second Issue1) Move to Row 12) Change the First Lookup Combo to the last item3) Move to Row 2

Note that even though sorting is enabled on the target column, the sort does not occur. If I modify the checkbox columns (which are known to trigger a sort from the first issue), then the grid resorts, but the value which has been modified seems to have no bearing on the sort results. I would like the records to resort appropriately on "SelectedRecordsChanged" and maintain a single record selection. I have attempted to use the "Table.SimulateListChanged()" method, but I receive inconsistent behavior or end up with multiple records selected, as identified in the first issue.

I am really sorry to inform you that I am not able to reproduce the issue in Essential version 4.4.0.51 with .Net 1.1 & 2.0. Please let me know What version of the Essential Grid and .Net framework are you using?.

We are currently using Syncfusion version 4.101.0.58 with .NET framework version 1.1.

>Hi John,

I am really sorry to inform you that I am not able to reproduce the issue in Essential version 4.4.0.51 with .Net 1.1 & 2.0. Please let me know What version of the Essential Grid and .Net framework are you using?.

Is there any additional information on this request for assistance with regards to the GridGroupingControl and proper sorting behavior?

Thanks.

>Hi Haneef,

We are currently using Syncfusion version 4.101.0.58 with .NET framework version 1.1.

>Hi John,

I am really sorry to inform you that I am not able to reproduce the issue in Essential version 4.4.0.51 with .Net 1.1 & 2.0. Please let me know What version of the Essential Grid and .Net framework are you using?.

Type 1: Row based selectionThis selection support can be turned on by setting the grid.tableOptions.AllowSelections to something other than None. This selection functionality raises events like the grid.TableModel.SelectionChanging/Changed.

Type 2: Record based selectionThis selection support is turned on by setting the grid.TableOptions.AllowSelections to None and setting the grid.TableOptions.ListBoxSelectionMode to something other than None.

[c#]this.gridGroupingControl1.Table.SelectedRecords.Add(record);

Please refer to the following KB article for more details.http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=344

Thank you for your response, but that does not address the issues that I am experiencing. I am having issues with maintaining proper record selection when the GridGroupingControl dynamically resorts based on changes to the data of the bound objects.

I have attached sample code and steps on how to replicate my issues, as well as statements on how I need the grid to function. Please see my initial post for the details.

The code you provided works as indicated. Thank you for your assistance with this issue.

I have one further question which is related to the first issue. When modifying a record so that it triggers a sort, and then clicking to another record, the grid.Engine.ResetTable() method will be invoked. Currently, the record to be selected after the resort will be different from the one which was clicked before the sort; it will be the record at the index which was clicked and not the actual record. Is there a way to ensure that the record which was selected before the sort maintains the selection after the sort, instead of selecting the record which moved to its pre-sort index?

Please let me know if you have any additional details on this request.