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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Webforms Grid - ToolBar / Rendering Error

Thread ID:





129724 Mar 30,2017 12:57 PM UTC Mar 31,2017 02:47 PM UTC ASP.NET Web Forms 1
Tags: Grid
Danie van Eeden
Asked On March 30, 2017 12:57 PM UTC


the moment I add the following:

<ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>

to my grid, the grid gives my the following data source error:

There was an error renderinge the control. The DatasourceID of Grid1 must be the ID of a control of type IDatasource....

I then need to relink the data source for the grid to display.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 31, 2017 02:47 PM UTC

Hi Danie, 

Thanks for contacting Syncfusion support. 

Query: Error thrown as “ The DatasourceID of Grid1 must be the ID of a control of type IDatasource”. 

We have analyzed your query and we suspect that you bind the SqlDataSource in Grid. If we miss to add the  SqlDataSource connecting string in the Grid code then the reported issue get reproduced. 
Please ensure that you have add the SqlDataSource connection string to the sample and the ID given in the SqlDataSource connection string, DataSourceID value of ejGrid property both are same.  

Refer the below code example. 

<ej:Grid ID="Grid1" runat="server" DataSourceID="SqlData" Query ="new ej.Query().from('Orders').select(['OrderID', 'CustomerID', 'EmployeeID', 'ShipCity', 'Freight']).take(5)">  
       <EditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" EditMode="Dialog" /> 
            <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings> 
        <asp:SqlDataSource ID="SqlData" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>" 
            SelectCommand="SELECT * FROM [Orders]"></asp:SqlDataSource> 

We have prepared a sample and it can be downloadable from the below location. 

If you still face the same issue then please get back to us with the following details for better assistance. 

  1. Screen shot or video demonstration of the issue.
  2. Share the Grid code example.
  3. Essential studio version.
  4. Stack trace of the issue.
  5. If possible share the sample or reproduce the issue in the attached sample.

Thavasianand S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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