Custom Add Button on SfGrid ?

Hi

I want to use my own button (external from Grid) for adding new records on SfGrid. (datagrid is dialog edit mode)
Can I make it ? How ?
Thanks
HB




3 Replies 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team October 14, 2020 09:23 AM UTC

Hi Hamdi, 

Greetings from Syncfusion support. 

We suggest you to call the AddRecord() method of Grid to programmatically open the edit Dialog. Please refer and use as like the code below, 

 
<SfButton @onclick="Add"> Add </SfButton> 

SfGrid<Order> Grid; public async Task Add(){    await this.Grid.AddRecord();}

Please refer the below documentation for more details, 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer

HB Hamdi Boyaci October 14, 2020 03:06 PM UTC

Super cool!

Thanks your best support.
You can close the ticket.


RS Renjith Singh Rajendran Syncfusion Team October 15, 2020 02:20 PM UTC

Hi Hamdi, 

Thanks for your update. 

We are glad to hear that the suggested solution helped you in achieving your requirement.  

Please get back to us if you need further assistance. 

Regards, 
Renjith R 


Loader.
Up arrow icon