How to add record in grid by descending order

I have an grid control.I am adding record in grid from external control.It works fine as per our requirement.I would like yo know how to add record always in descending order in grid but currently records are added in bottom only.


1 Reply

RS Renjith Singh Rajendran Syncfusion Team December 31, 2021 06:01 AM UTC

Hi Kins, 
 
Greetings from Syncfusion support. 
 
We suggest you to specify the row index as parameter for the AddRecordAsync method to add the new row at a particular row index. Please refer the codes below, 
 
 
public async Task OnClick() 
{ 
    ... 
    await Grid.AddRecordAsync(newdata, 0); //specify the correspodning row index 
} 
 
 

Please refer and use the above suggestion. If you are facing any difficulties or if we have misunderstood your requirement, then kindly get back to us with a detailed explanation of your requirement/scenario of how you are adding data to Grid along with a simple replication sample based on your scenario to proceed further. 
 
Regards, 
Renjith R 


Loader.
Up arrow icon