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.