This is a migrated thread and some comments may be shown as answers.

Grid Content Blank After Data Reset

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 02 Jul 2014, 04:01 PM
I have the following function that resets grid data:

function ReSetGridDataSource(grid, data, sort, emptyMessage) {
    if(grid.length > 0) {
        if(grid.substring(0, 1) !== '#') {
            grid = '#' + grid;
        }

        var grd = $(grid).data("kendoGrid");
        var ds =  new kendo.data.DataSource();
        
        
        ds.data(data);
        if(sort !== null && isArray(sort)) {
            ds.sort(sort);
        }
        
        if(emptyMessage !== null && emptyMessage !== undefined) {
            if(emptyMessage.length > 0 && ds.total() === 0 && $("#emptyMessageRow_" + grid) == null) {
                var colCount = $(grid).find('.k-grid-header colgroup > col').length;
                $(grid).append('<tr id="emptyMessageRow_' + grid + '" class="kendo-data-row"><td colspan="' + colCount + '" style="text-align:center; font-family:arial; font-size:24px;"><b>' + emptyMessage + '</b></td></tr>');
            }
        }
        else {
            try {
                $("#emptyMessageRow_" + grid).remove();
            }
            catch(err) {}
        }

        grd.setDataSource(ds);
        grd.refresh();
    }
}

The data is a JSON array of objects.  The application is designed specifically for an IPAD, after making changes to the data the above function is called, the grid content area blanks out, if I tap the blank area several times the data reappears, if I leave the grid alone (do not tap the blank area) the data never reappears.

I have alter the function for testing where the data is not refreshed if the grid has been previously bound, the content are remains visible.  



1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Jul 2014, 07:25 AM
Hello Joe,

You have probably stumbled upon the following browser bug, which is exhibited on iPads only:

http://www.telerik.com/forums/web-ui-grid-display-problem-in-ipad-safari-(ios-7-)#Cn9AdIeJkEiAtIBp58R-RA

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or