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

No Datasource Property for Grid???

Thread ID:

Created:

Updated:

Platform:

Replies:

125338 Aug 9,2016 09:28 PM UTC Oct 27,2017 12:51 PM UTC ASP.NET Web Forms 5
loading
Tags: Grid
Michael Lambert
Asked On August 9, 2016 09:28 PM UTC

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???

Mani Sankar Durai [Syncfusion]
Replied On 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. 


Dave Mackey
Replied On 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


Renjith Singh Rajendran [Syncfusion]
Replied On 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. 


Roberto Viquez
Replied On 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



Mani Sankar Durai [Syncfusion]
Replied On 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. 
 
 


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

;