We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

First row is automatically selected

I am using a GridGroupingControl and I have enabled the ability to select multiple rows.
The problem I am having is that when I select a row during runtime the first row also gets selected automatically and it forces me to deselect the row by clicking on it.
I would like to know which setting needs to be enabled or disabled to stop the first row from being selected automatically.

This only happens when I make the first selection.
e.g. navigate to page which has grid --> grid displays and is populated with 10 rows --> I select row 5
Excepcted result: Row 5 is selected
Actual result: Row 1 and Row 5 is selected
if I deselect Row 1 and select Row 7, only rows 5 and 7 are now selected which is expected, except that I don't want to have to deselect row 1 just because it is being selected automatically the first time I try to select a row..

Grid Setup:
Allow Selection = Row, Multiple, AlphaBlend
ListBoxSelectionMode = MultiSimple
ListBoxSelectionRecursive = False

Thanks in Advance

5 Replies

AR Arulpriya Ramalingam Syncfusion Team October 5, 2017 12:01 PM UTC

Hi Janine,   
Thanks for using Syncfusion products.   
We have analyzed the reported scenario at our end. As per the grid architecture, the current cell will be moved to first cell of the grid while loading the grid with pager. So, the selection will be added for the current record. We have created a simple sample. In that, the first row will be restricted from automatic select, when navigating to next page by using the ArrowButtonClicked event of RecordNavigationBar. Please refer to the below code and sample,   
Code snippet   
//Event Triggering   
this.gridGroupingControl1.RecordNavigationBar.ArrowButtonClicked += RecordNavigationBar_ArrowButtonClicked;   
//Event Customization   
private void RecordNavigationBar_ArrowButtonClicked(object sender,ArrowButtonEventArgs e)   
    //To clear the selection   

JH Janine Herman October 5, 2017 03:02 PM UTC

Thanks for your response.
it is working as expected now.

I have an additional question with the multi select

I have an assign location textbox outside of the grid.. and when I select multiple rows to assign the same location to all the selected rows I seem to lose the selection. as soon as I click on the textbox..

How can I keep the selected rows and when I click on a different control on the form that is outside of the Grid?


AR Arulpriya Ramalingam Syncfusion Team October 6, 2017 01:06 PM UTC

Hi Janine, 
Thanks for your update. 
We have tried to reproduce the reported scenario at our end but unfortunately we could not reproduce the issue. By default, the selection will not be cleared when the control lost focus. We have tried the below test cases to reproduce the issue, 
  • Tested with all GridSelectionFlags.
  • Tested with all ListBoxSelectionMode.
  • Tested with ListBoxSelectionRecursive enabled and disabled.
  • Tested with all ListBoxSelectionCurrentCellOptions.
Please refer to the attached video, 
We are little bit unclear of your scenario. Can you please provide the below details that will be helpful for us to reproduce the issue and provide you a proper solution at the earliest? 
  • A screenshot/video of your requirement/scenario with exact use case. So that, we could reproduce the issue.
  • Refer the attached sample and let us know if we missed anything from your customization.

JH Janine Herman October 16, 2017 01:48 PM UTC

The setting(s) I have that seem to be of value in the scenario where after selecting a few items from the list and then clicking on the textbox and losing the selection...

In Grouping Control Section

     ActivateCurrentCellBehaviour =  Select all

     AllowSetCurrentRecordOnFocus = False

Table Options Section

      AllowSelection = Row, Multiple, AlphaBlend

     ListBoxSelectionMode = MultiSimple

     ListBoxSeceltion Recursive = Tru

When the grid loads NO items are selected, or shown as selected,
If I then proceed to select Items in the list and click on the textbox, the GridControl loses its selections and by default selects only the first item in the grid. (all other selections are deselected and first item in grid is selected even if it was not selected before)
If I however select the very first item in the list first and then select the other items and click on the textbox the selections are not lost.

AR Arulpriya Ramalingam Syncfusion Team October 17, 2017 11:35 AM UTC

Hi Janine, 
We have created a new support-incident for better follow-up under your account. Please follow-up with that incident. 

Live Chat Icon For mobile
Up arrow icon