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

No Datasource Property for Grid???

I'm trying to just bind a Entity to a Grid in a ASP Web form and the Grid has no Datasource property?  The Documentation say it does not, but it isn't there.  What am I missing???

5 Replies

MS Mani Sankar Durai Syncfusion Team August 10, 2016 12:56 PM UTC

Hi Michael, 

Thanks for contacting Syncfusion support, 
We have analyzed your query. To bind the dataSource in ASP Webforms we used to bind it in code behind by rendering the Grid id and passing it to the dataSource. 

Please refer the code example, 
[Default.aspx.cs] 
namespace Sample 
{ 
    public partial class _Default : Page 
    { 
        List<Orders> order = new List<Orders>(); 
   private void BindDataSource() 
        { 
            int code = 10000; 
            for (int i = 1; i < 10; i++) 
             
 
            } 
            this.Grid.DataSource = order; 
        } 
 

In the above code example we have passed the order data to the Grid dataSource. 
Please refer the documentation of ASP Web form how the data has been bound to the grid dataSource 

We have also prepared a sample that can be downloaded from the below link, 



Regards, 
Manisankar Durai. 



DM Dave Mackey September 4, 2017 11:57 PM UTC

I am seeing this same issue. There is no Datasource property for the Grid, even though your instructions below show us using:

this.Grid.DataSource = order;

And the guidance at the help documentation you shared also shows Grid.DataSource as being valid.

Help?

Thanks,

Dave



RS Renjith Singh Rajendran Syncfusion Team September 5, 2017 12:14 PM UTC

Hi Michael, 

We have analyzed your query. We suspect that you are asking for “dataSource” property of Grid in the design view. There is a property named “DataSourceID” where can assign the Id of the DataSourceControl of the Grid.  

In ASP.NET it is not possible to bind collections or list at design view. So the DataSource property is not visible at the design view. The collections or list could be bound to DataSource by means of code behind. 

Please refer the documentation link below for further reference, 

Regards, 
Renjith Singh Rajendran. 



RV Roberto Viquez October 26, 2017 01:58 PM UTC

Hello Michael Lambert

I was having a similar issue, in my code I was unable to find the .DataSource property of the grid, 

I was missing this three reference on my project, it looks like just adding the control on the designer is not enough and you have to add some additional references manually.


Syncfusion.EJ.Web
Syncfusion.EJ.Export
Syncfusion.EJ




MS Mani Sankar Durai Syncfusion Team October 27, 2017 12:51 PM UTC

Hi Roberto, 

We have checked your query and the DataSource property for the grid will be available in code behind. To bind the dataSource in ASP Webforms we used to bind it in code behind by rendering the Grid id and passing it to the dataSource property.  
[Default.aspx.cs]  
namespace Sample  
{  
...        List<Orders> order = new List<Orders>();  
   private void BindDataSource()  
            …  
  
            }  
            this.Grid.DataSource = order;  
        }  
  
 
 
We have also prepared a sample that can be downloaded from the below link,  
 
 
 
Also refer the following assemblies in your ASP.NET application, which allows you to use any of the Syncfusion ASP.NET controls within it. 
  • Syncfusion.EJ
  • Syncfusion.EJ.Web

When exporting it must to refer the following assemblies in your application. 
  • Syncfusion.EJ.Export
  • Syncfusion.Pdf.Base
  • Syncfusion.XsIO.Base
  • Syncfusion.DocIO.Base
  • Syncfusion.Compression.Base
We have also bind the data using DataSourceID property in grid where can assign the Id of the DataSourceControl of the Grid.   
Please let us know if you need further assistance. 
 
Regards, 
Manisankar Durai. 
 
 


Loader.
Up arrow icon