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

Get grid selection

Thread ID:

Created:

Updated:

Platform:

Replies:

145591 Jun 30,2019 12:49 AM UTC Jul 2,2019 12:51 PM UTC Blazor 3
loading
Tags: Grid
Ben
Asked On June 30, 2019 12:49 AM UTC

Hi

I haven't been able to find a sampel that demonstates how to get a list of the selected items in the grid.  I have found GetSelectedRows() and similar methods in the API reference but they take no parameters and return void.  I can see there are some options for single row selection but not multiple.

Am I missing something or is this just not implemented yet?

Regards
Ben

Vignesh Natarajan [Syncfusion]
Replied On July 1, 2019 11:37 AM UTC

Hi Ben,  

Thanks for contacting Syncfusion support.  

Query: “I haven't been able to find a sampel that demonstates how to get a list of the selected items in the grid. 

From your query we understand that you need to get the selected records details in Grid. Currently we do not have support to achieve your requirement. Since it is known request we have implemented your requirement and it will be included in our upcoming nuget release which will be rolled out on or before July 2nd 2019.  Once the nuget release is rolled out successfully, you can achieve your requirement using GetSelectedRecords() method. It will return the values in form of JObjects, where you can serialize them using model class.  

Refer the below code example  

<EjsButton ID="Clk" @onclick="@clk">Click</EjsButton> 
 
<EjsGrid id="Grid" @ref="grid" AllowPaging="true" AllowSelection="true" DataSource="@data"> 
    <GridSelectionSettings Type="@SelectionType.Multiple"></GridSelectionSettings> 
    <GridColumns> 
        ………………………………………. 
    </GridColumns> 
</EjsGrid> 
 
………………………… 
 
 
private async void clk() 
{ 
    var a = await grid.GetSelectedRecords(); 
//serialize the JSON objects using its model class. 
    List<Orders> result = JsonConvert.DeserializeObject<List<Orders>>(JsonConvert.SerializeObject(a));   
} 

Refer the below screenshot for the output 

 

Till then we appreciate your patience.  

Regards, 
Vignesh Natarajan.  
 


Ben
Replied On July 1, 2019 12:25 PM UTC

Many Thanks Vignesh

Love the dedication from Syncfusion.  Looking forward t othe nuget package.

Regards
Ben

Vignesh Natarajan [Syncfusion]
Replied On July 2, 2019 12:51 PM UTC

Hi Ben,  

Thanks for the update.  

We are glad to inform that our latest (17.2.0.28-Beta) nuget release for Syncfusion blazor components were successfully rolled out. Since we have some major changes in our latest nuget packages release (17.2.0.28-beta). Please find the release notes from below  


Also ensure to refer the below nuget package (Syncfusion.EJ2.Blazor) instead of Syncfusion.EJ2.AspNet.Core.RazorComponents. 
 
 
 
 

We have included the fix for the issue “GetSelectedRecords return void instead of selected records” in this release. So kindly upgrade to latest nuget release (17.2.0.28-Beta) to achieve your requirement . For your convenience we have prepared a sample which can be downloaded from below  


Refer our UG documentation and online sample browser for your reference 



Please get back to us if you have further queries.    

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