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.
Syncfusion Feedback

AllowNew in GridGrouping

Thread ID:

Created:

Updated:

Platform:

Replies:

101724 Nov 15,2011 10:43 PM UTC Nov 23,2011 04:47 AM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Truman Lackey
Asked On November 15, 2011 10:43 PM UTC

If the AllowNew is set to true in the GGC a row appears in the browser that has an * and looks like it can be selected and data entered to create a new record.

I can not get this to work. If allow new is true how do I add a new record to the grid? I am using a LinqDataSource using SqlToLing and the Entity Framework.


Truman Lackey
Replied On November 16, 2011 04:58 PM UTC

I have the AddNewRecord row working in that it is showing up and I can enter data.

Is there an example of getting the CRUD working with a linq data source? I'm kind of shooting in the dark not knowing what needs to be done.

Also can I get the AddNewRecord row always to appear at the end/start of the current page? With paging the AddNewRecord row either shows on the first/last page and not every page.


Ranjithkumar R G [Syncfusion]
Replied On November 23, 2011 04:47 AM UTC

Hi Truman,

Thanks for using Syncfusion products.

Your requirement of using LINQ as datasource in GridGroupingControl can be achieved by PassThroughGrouping feature.When a grid is not bound to pass-through grouping by default, it will retrieve all the records in the bound data source to the client, even if only a few of them are displayed in the current view. This could become serious overhead when dealing with large data sources. To overcome this, instead of binding the grid to the data source directly, bind it to the LINQ query results. When you do so, data from your data source is retrieved on demand when a user requests it. Please refer to the below code snippet.

[ASPX]

runat="server" GridGroupingControlID="GridGroupingControl1"
SelectTable="Orders" SourceContext="DataClassesDataContext" >



Your requirement of showing add new record after details can be achieved by setting the property ShowAddNewRecordAfterDetails to true. Please refer to the code snippet below.


[ASPX]





Please refer to the below link to download the sample application.

http://www.syncfusion.com/downloads/Support/DirectTrac/86943/Passthroughgrouping171522482.zip


Please let me know if you have any concern.

Regards,
Ranjithkumar.




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

;