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

Empty Grid

Hello,

I've just started using the grid element for my Lightswitch HTML application and seem to be stuck wright at the beginning. Must be something simple because I haven't found a corresponding thread here so far.
The problem is basicly, no grid appears. I followed the instructions in the documentation. No matter whether it's a local DB or a remote SQL-DB im trying to connect to it doesn't work (allthough data is displayed within the standard built in screens from vb).
Here my code.

/// <reference path="~/GeneratedArtifacts/viewModel.js" />
myapp.Table1ItemsGridTemplate.Table1Item_render = function (element, contentItem) {
    // Write code here.
    var itemTemplate = $("<div></div>").attr('id', 'Table1Item')

    // Append the div element to screen
    itemTemplate.appendTo($(element));

    contentItem.value.oncollectionchange = function () {

        if (itemTemplate.hasClass('e-grid')) {
            itemTemplate.ejGrid('destroy');
        }
        var first = contentItem.children[0], fieldname=[];
        for (i = 0; i < first.children.length; i++) {
            fieldname[i] = { field: first.children[i].valueModel.name };
        }
     
        //Rendering the Grid Control
        itemTemplate.ejGrid(
            {
                dataSource: contentItem.value.data,
                columns: [
                    {field: "testdata"}]
            });
}
}

Any help would be much appreciated.

Thanks,
Benjamin

2 Replies

VA Venkatesh Ayothi Raman Syncfusion Team February 5, 2016 12:51 PM UTC

Hi Benjamin,

Thanks for contacting syncfusion support.

We are not able to reproduce the reported issue. Please ensure that scripts and themes files are added in concern folders and for your reference we have created a sample  for VB application.  Could you please check whether you get proper data in contentItem.value.data? .

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/VBGRID~11410209874.ZIP

For your reference find the below image:

http://www.syncfusion.com/downloads/support/directtrac/general/scripts-132735850


Still issue is reproduce ,Could you please share more details for find the issue and provide a prompt solution.

1.       Provide screen shot of the issue you are facing.

2.       Please share Essential studio and browser version details.

3.       If you are facing any console error means, please share the screen shot of the issue.

4.       Please provide a reproducing sample for us or make our sample as issue reproducible.



Regards,
Venkatesh Ayothiraman.



VA Venkatesh Ayothi Raman Syncfusion Team February 5, 2016 12:51 PM UTC

Hi Benjamin,

Thanks for contacting syncfusion support.

We are not able to reproduce the reported issue. Please ensure that scripts and themes files are added in concern folders and for your reference we have created a sample  for VB application.  Could you please check whether you get proper data in contentItem.value.data? .

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/VBGRID~11410209874.ZIP

For your reference find the below image:

http://www.syncfusion.com/downloads/support/directtrac/general/scripts-132735850


Still issue is reproduce ,Could you please share more details for find the issue and provide a prompt solution.

1.       Provide screen shot of the issue you are facing.

2.       Please share Essential studio and browser version details.

3.       If you are facing any console error means, please share the screen shot of the issue.

4.       Please provide a reproducing sample for us or make our sample as issue reproducible.



Regards,
Venkatesh Ayothiraman.


Loader.
Live Chat Icon For mobile
Up arrow icon