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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How Add new Record

Thread ID:

Created:

Updated:

Platform:

Replies:

120066 Aug 27,2015 06:03 PM UTC Aug 28,2015 01:20 PM UTC WinForms 1
loading
Tags: GridDataBoundGrid(Classic)
ale
Asked On August 27, 2015 06:03 PM UTC

Hello how i coud add a new record bellow a selected record??
Greetings Alejandro

Venkatesh Sundaram [Syncfusion]
Replied On August 28, 2015 01:20 PM UTC

Hi Ale,

Thank you for your interest in Syncfusion product.

                                           

                                         Query


                               Insert Row in grid

Since DataBoundGrid is mapped with datasource  If you want to add the rows or columns to the GridDataBoundGrid Control, you have to add the columns in the  datasource which is mapped to GDBC. To accept all the changes in the datasource when add or delete the Row/Columns , you can use AcceptChanges() property .

Please refer the below code:

void GridDataBoundGrid1_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)

{

if (e.MouseEventArgs.Button == MouseButtons.Right)

{

DataRow tableRow = table.NewRow();

table.Rows.InsertAt(tableRow, e.RowIndex); //To add the row

// table.Columns.Add(); //To add the column

table.AcceptChanges();   

this.GridDataBoundGrid1.Refresh();

}

}


Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/143321/ze/GDBG_Add_new_row-637406240

Please let me know if you have any concern.

Regards,
Venkat.




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.

Warning Icon 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.Close Icon

;