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

Grid no display data

Hello,
i'm new with Syncfusione components.
In my asp.net app, I have a Grid connected to a MSSQL or an MYSQL table, but when I run the application, do data is shown. 
Using the standard GridView the data are shown.

Can anyone help me?

Thanks.

1 Reply

RU Ragavee U S Syncfusion Team February 17, 2015 11:54 AM UTC

Hi Angelo,

Thanks for your interest in Syncfusion products.

We have analyzed the View code that you have shared and suspect that the cause of the reported issue is the “Template” property added to each column of the grid.

The Field property of the column is must while rendering the grid. The grid searches the dataSource for the Field Name specified within the Field property of the column and thus retrieves the data from the dataSource based on the field specified.

When the mentioned field name is not available in the dataSource, then empty data will be displayed for the corresponding field. The HeaderText property of the column is also needed to mention a custom header  name to the column.

Similarly, the Template property is used to set a customized template column within the grid (for eg., links, icons, images or other Syncfusion controls). When the Template property is specified, the grid doesn’t search the dataSource for the fieldname, rather creates a template column.

The “Template” property of the column is used to set some template as a particular column data. Since you have specified the template property for each column, the datas were not bound to the column and thus were not displayed.

Whereas in the standard GridView component of visual studio, the template property is not defined. So the grid data has been rendered/displayed.

Please refer the below online link for more and clear information on the APIs available and their usage.

Class Reference Link: http://help.syncfusion.com/UG/JS_CR/ejGrid.html

Online Documentation Link: http://help.syncfusion.com/ug/js/default.htm#!documents/conceptsandfeatures22.htm

Also the APIs used in ASP.NET is similar to that of JavaScript APIs. For example, in JavaScript allowFiltering is used to enable filtering to grid whereas in ASP.NET, the first letter is capitalized in the property that is, AllowFiltering.

For your convenience, we have created a simple sample using SQLBinding and the sample can be downloaded from the below location.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/Sample-1490199812.zip

Please get back to us if you need any further assistance.

Regards,

Ragavee U S



Loader.
Up arrow icon