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 rows

Can u please point good example where i can do the ADD new rows to the grid. i have seen some examples releaed to the update and delete none of the respect to the Add new rows.
Me.GridGroupingControl1.TableDescriptor.AllowNew = True

I used above method but it is not working as expected.

Thanks for your help ...


5 Replies

RP Rekha P Syncfusion Team January 2, 2009 09:09 AM UTC

Hi Prasanna,

Thank you for your interest in Syncfusion Products.

In order to add a new row into the Grid, the "AddNew" row can be shown using the AllowNew property. Please refer the code snippet below to achieve this.

[ASPX]


[C#]
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Me.GridGroupingControl1.TableDescriptor.AllowNew = True
End Sub


The client-side architecture of the Grid provides you with abilities to edit a row easily and you need to double-click the row to enter into the Edit mode. Clicking on the other row, would automatically save the contents of the edited row.

Also please refer the sample files below to achieve this.

http://websamples.syncfusion.com/samples/Grid.Web/6.4.0.15/F78809-AddingNewRows/Grid_Web_AddingNewRow.zip

Please let me know if this helps you.

Thanks,
Rekha



MA Miguel Almeida February 5, 2010 04:54 PM UTC

This link isn't valid any more.

I would very much appreciate a sample for Adding Rows.


JB Jaffersathick B Syncfusion Team February 10, 2010 10:40 AM UTC

Hi Miguel,

Thank you for using Syncfusion product.

We suggest you to set the property in the Tabledescriptor AllowNew as true for showing the AddNew row in the Grid. DataSourceControlRowAdding and DataSourceControlRowAdded are the event associated with the row adding.

Please refer the help document from the below links:

//Events

http://help.syncfusion.com/ug_74/gridweb/DataEditUpdateDelete.html

//AddNew property

http://help.syncfusion.com/ug_74/gridweb/AddNew.html

Please refer our online samples from the below link:

http://samples.syncfusion.com/ASPNET/7.4.0.20/Web/Grid.Grouping.Web/samples/3.5/PopulateData/ForeignKey/cs/ForeignKey.aspx?args=1

We will not able to provide samples in general forum due to security purpose.

Let me know if you have any queries.

Regards,
Jaffer.B


AD Administrator Syncfusion Team February 26, 2010 04:46 AM UTC

I dont understand how this query has been answered. How does the AddNew feature work???

I have done exactly as in the documentation. I have also looked at the samples suggested.

In C#
this.GridGroupingControl1.TableDescriptor.AllowNew = true;

In aspx:


In Page_Load, a dataTable is set as data source. The table has zero rows. That is the functionality required. User of grid must add new rows to define data.

On page launch, the grid shows one empty row. I can edit this row. But dont know how to come out of edit mode. Please note that there is NO SECOND ROW to click on. How does the second row get added??

I tried enter key to get out of edit mode. That too does not add a new row.

We chose this grid because of the features. Adding a new row is a basic feature needed. If this does not work, please let me know. I'll stop wasting my time and use some other grid like Infragistics, which does provide simple row addition capability.



JB Jaffersathick B Syncfusion Team February 26, 2010 06:46 AM UTC

Hi Vinay,

Thank you for using Syncfusion products.

We deeply regret for the inconvenience caused to you. We will have a follow up for this forum in the Direct Trac incident id #65217.

Regards,
Jaffer.B

Loader.
Live Chat Icon For mobile
Up arrow icon