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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

In 17.2.46 selecting the first row in the grid results in error

Thread ID:

Created:

Updated:

Platform:

Replies:

146820 Aug 21,2019 02:04 PM UTC Aug 22,2019 10:45 AM UTC Blazor 1
loading
Tags: Grid
ITninja
Asked On August 21, 2019 02:04 PM UTC

Grid:
<EjsGrid DataSource="@checks" AllowPaging="true" AllowSorting="true" AllowFiltering="true" AllowExcelExport="true" ModelType="@checkModel" AllowSelection="true">
                            <GridSelectionSettings Mode="Syncfusion.EJ2.Blazor.Grids.SelectionMode.Row" Type="SelectionType.Single"></GridSelectionSettings>
                            <GridEvents TValue="DTOs.APIs.Checks" RowSelected="@SelectRow" RowDeselected="@(()=> selectedCheck = null)"></GridEvents>
                            <GridColumns>
                                <GridColumn HeaderText="Check Number" Field="CheckNumber"></GridColumn>
                                <GridColumn HeaderText="Check Date" Field="CheckDate" Format="yMd"></GridColumn>
                                <GridColumn HeaderText="Check Amount" Field="Amount" Format="C2"></GridColumn>
                            </GridColumns>
                        </EjsGrid>


Callback:
void SelectRow(RowSelectEventArgs<DTOs.APIs.Checks> args)
    {
        GetCheckDetails(args.Data);
    }

private void GetCheckDetails(DTOs.APIs.Checks check)
    {
        selectedCheck = check;
        StateHasChanged();
    }


When I click the first row I get this error in the console:



It only seems to effect the first row, and when I sort and the first row say becomes the last, the last row is what causes the error.


Also, when I unselect a row then select a row the screen flashes twice then shows the new row. Is there another event I should be listening for instead of "RowDeselected"?



Vignesh Natarajan [Syncfusion]
Replied On August 22, 2019 10:45 AM UTC

Hi ITninja,  

Greetings from Syncfusion support.  

Query: “selecting the first row in results in error” 

We have prepared a sample using your code example and we are not able to reproduce the issue while selecting / unselecting the records. Kindly download the sample from below link  


As we quite unclear about the issue, kindly share the following details.  

  1. Do you want to maintain selection when sorting action performed in Grid?.
  2. You have mentioned that when unselecting the record and select a record , screen flashed twice and select a new record. Can you please share the video demonstration of the reported issue.
  3. If possible share the issue reproducible sample or reproduce the reported issue in provided sample.
  4. In the RowDeselected event what action do you want to perform?. Kindly share details about your requirement.

Above requested details will be helpful for us to validate the reported query at our end and provide the solution as early as possible. 
      
Regards, 
Vignesh Natarajan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon