The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi, I am trying to use the gridgrouping control in an asp.net 2.0 app. Following your tutorials, I have set up a data source, got my DataBind() in the Page_Init and whilst filtering/sorting works, if I edit or try to add a new record, I get this message:
Server Error in ''/TestSite'' Application. --------------------------------------------------------------------------------
Multiple controls with the same ID ''GridGroupingControl1~TR~0~_TOPGROUP_^*R0'' were found. FindControl requires that controls have unique IDs. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Multiple controls with the same ID ''GridGroupingControl1~TR~0~_TOPGROUP_^*R0'' were found. FindControl requires that controls have unique IDs.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
SBSuresh Babu Syncfusion Team August 23, 2006 10:59 PM UTC
Hi Tony,
I was able to reproduce this issue. Can you please check if the primary key has been set for the table, this might be causing the error.
Essential Grid also expects the data source to include a primary key column. If your data source does not have a primary key column, make sure to include a PrimaryKeyColumn to the TableDescriptor before calling DataBind(), as shown below.
Here is an example of how the WebForm''s Init would typically look in an Application using the GridGroupingControl:
[C#] private void WebForm1_Init(object sender, System.EventArgs e) { this.oleDbDataAdapter1.Fill(this.dataSetCustomers1); //Add a primary key to the PrimaryKeyColumns collection GridTableDescriptor mainTD = this.GridGroupingControl.TableDescriptor; // CustomerID could be a field name in the datasource mainTD.PrimaryKeyColumns.Add("CustomerID"); //Call DataBind this.GridGroupingControl.DataBind(); }
[VB] Private Sub WebForm1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Me.oleDbDataAdapter1.Fill(Me.dataSetCustomers1) ''Add a primary key to the PrimaryKeyColumns collection Dim mainTD As GridTableDescriptor = Me.GridGroupingControl.TableDescriptor ''CustomerID could be a field name in the datasource mainTD.PrimaryKeyColumns.Add("CustomerID") ''Call DataBind Me.GridGroupingControl.DataBind() End Sub
please refer the users guide that ships with our essential grid install in this location: Syncfusion Essential Studio-> Essential Grid-> ASP.NET-> Introducing Essential grouping grid for ASP.NET->Using GridGrouping Control->Setting up Data Binding topic which will help you more in binding the data.
I hope this will solve the issue.
Please let us know, if you still have any problem.