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.
Unfortunately, activation email could not send to your email. Please try again.

Add new record using a push button click

Thread ID:

Created:

Updated:

Platform:

Replies:

125236 Aug 2,2016 02:44 AM Aug 10,2016 01:29 AM Windows Forms 5
loading
Tags: GridGroupingControl
sumudu
Asked On August 2, 2016 02:44 AM

Hi,

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?

Thanks,
Sumudu Ekanayake


Amal Raj Umapathy Selvam [Syncfusion]
Replied On August 3, 2016 08:57 AM

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. 
    this.gridGroupingControl1.Table.EndEdit(); 

Sample Link 

Regards, 
Amal Raj U. 


sumudu
Replied On August 8, 2016 07:59 AM

Great...!! It's working.

Thanks & Regards,
Sumudu

Amal Raj Umapathy Selvam [Syncfusion]
Replied On August 9, 2016 12:04 AM

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. 
 
Regards, 
Amal Raj U. 


sumudu
Replied On August 9, 2016 12:32 AM

Yes. It's worked for me.

Thanks & Regards,
Sumudu

Gangabharathy Murugasen [Syncfusion]
Replied On August 10, 2016 01:29 AM

Hi Sumudu, 
  
Thanks for the update. 
  
Regards, 
M. Gangabharathy 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;