get values from selected rows in datagrid using column with checkboxes

Hi

In the documentation regarding record selection, you have an example where the row indexes os follows

    public async Task GetSelectedRecords(RowSelectEventArgs<Order> args)
    {
        SelectedRowIndexes = await this.Grid.GetSelectedRowIndexes();
        TotalValue = SelectedRowIndexes.ToArray();
        SelectedValue = "";
        foreach (var data in TotalValue)
        {
            SelectedValue = SelectedValue + " " + data;
        }
        StateHasChanged();
    }


Could you help me to obtain the IDS of my data model, of each selected row using a checkbox type column?
I not need the indexes, I need values

I need value from DATA_ID in every selected row

Thanks in advance!





3 Replies 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team November 27, 2020 09:33 AM UTC

Hi Jose, 

Greetings from Syncfusion support. 

We have validated your query and we suspect that you need to get the data of the selected records. If so we suggest you to use the GetSelectedRecords method to achieve your requirement. Please refer the below API reference for your reference. 


Regards, 
Jeevakanth SP. 


Marked as answer

JL jose luis barajas replied to Jeevakanth Palaniappan December 2, 2020 09:35 PM UTC

Hi Jose, 

Greetings from Syncfusion support. 

We have validated your query and we suspect that you need to get the data of the selected records. If so we suggest you to use the GetSelectedRecords method to achieve your requirement. Please refer the below API reference for your reference. 


Regards, 
Jeevakanth SP. 


Thanks

I'm going to test if I can do it with columns with checkbox


JP Jeevakanth Palaniappan Syncfusion Team December 3, 2020 05:37 AM UTC

Hi Jose, 

Thanks for the update. We will wait for you to check and get back to us if you have any queries. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon