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. Image for the cookie policy date

Add new record using a push button click


How i can add a record manually to the gcc when i clicked a push button. 
I have put a pushbutton to the end of the add new record row. currently it's automatically add when user fill the data in the row. But i nee to add this record within my pushbutton clicked event.

How do i do this?

Sumudu Ekanayake

5 Replies

AR Amal Raj U Syncfusion Team August 3, 2016 12:57 PM UTC

Hi Sumudu, 

Thanks for using Syncfusion products. 

In order to add new record when PushButton in last column of the AddNewRecord is clicked, EndEdit() method can be used. Please make use of the below code. 

Code Snippet 
//event hookup. 
this.gridGroupingControl1.TableControlPushButtonClick += new GridTableControlCellPushButtonClickEventHandler(gridGroupingControl1_TableControlPushButtonClick); 

void gridGroupingControl1_TableControlPushButtonClick(object sender, GridTableControlCellPushButtonClickEventArgs e) 
    //to add record on button click. 

Sample Link 

Amal Raj U. 

SU sumudu August 8, 2016 11:59 AM UTC

Great...!! It's working.

Thanks & Regards,

AR Amal Raj U Syncfusion Team August 9, 2016 04:04 AM UTC

Hi Sumudu, 
Thanks for your update. 
We are glad to know that the given solution has solved your query. Please let us know, If you need any further assistance. 
Amal Raj U. 

SU sumudu August 9, 2016 04:32 AM UTC

Yes. It's worked for me.

Thanks & Regards,

GM Gangabharathy Murugasen Syncfusion Team August 10, 2016 05:29 AM UTC

Hi Sumudu, 
Thanks for the update. 
M. Gangabharathy 

Live Chat Icon For mobile
Up arrow icon