The Gridline does not display in some cells

Posted by: timzod on 3 December 2018, 5:46 am EST

    • Post Options:
    • Link

    Posted 3 December 2018, 5:46 am EST

    Hi,

    I defined an empty template excel and full-filed it with raw data through your API(V11.2.1).

    but I found the grid line of some cells disappeared after repaint, I checked my code , all properties just like gridline.showVerticalGridline /gridline.showHorizontalGridline/ backColor are correct.

    I tried it in your website and still find this problem.

    https://www.grapecity.com/en/demos/spread/JS/ExcelMobileSample/

    Anyone can tell me why?

    I have attached the template and the excel which has data.

    Below content is how i fulfilled data to template

    ExcelEditor.replaceDataSheet = function (sheet, dl) {
        var headList = new Array();
        for (var d in dl[0]){
            headList.push(d);
        }
        var maxY = sheet.getRowCount();
        var maxX = sheet.getColumnCount();
        if (sheet.getRowCount() < dl.length){
            maxY = dl.length;
            sheet.addRows(sheet.getRowCount(), dl.length - sheet.getRowCount());
        }
        if (sheet.getColumnCount() < headList.length){
            maxX = headList.length;
            sheet.addColumns(sheet.getColumnCount(), dl.length - sheet.getColumnCount());
        }
        // The head is unchanged,-> i != 0
        for (var i = 1; i < maxY; i++){
            for (var j = 0; j < maxX; j++){
                var cell = sheet.getCell(i,j);
                if (i < dl.length && j < headList.length){
                    cell.text(dl[i][headList[j]]);
                } else {
                    cell.text('');
                }
                var style = sheet.getStyle(i, j);
                if (!style){
                    style = new GC.Spread.Sheets.Style();
                    style.hAlign = GC.Spread.Sheets.HorizontalAlign.left;
                }
                style.wordWrap = true;
                sheet.setStyle(i, j, style);
            }
            sheet.autoFitRow(i);
        }
    }
    ```[zip filename="GridLineIssue.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-89208844-955d-4adc-b017-a0db9acd0ac3.zip[/zip][img]https://gccontent.blob.core.windows.net/forum-uploads/file-05a9a6fa-4a2f-425a-a157-f13143d15e30.PNG[/img]
  • Posted 4 December 2018, 3:00 am EST

    Hi, i found that cancel Freeze Panes can show grid line,

    The attached spreadsheet freeze row1/column 2, it seems that when the cell data exceeds the default width of column2 , the grid line will disappear.

    I wonder how to display grid line without cancel freeze function?

    Thanks!

  • Posted 5 December 2018, 5:22 am EST

    Found a new solution that is set sheet.options.allowCellOverflow = false;

    It seems not be a perfect solution to this case but did work.

    Thanks

  • Posted 6 December 2018, 10:27 am EST

    Hello,

    We are able to replicate this issue with the given Excel file. This issue has been escalated to the development team for further investigation. We will let you know as soon as we get an update on it.

    The tracking id for this issue is :268131

    Thanks,

    Deepak Sharma

  • Posted 7 December 2018, 2:28 am EST

    Hello,

    I tested this issue with online demo:

    https://www.grapecity.com/en/demos/spread/JS/ExcelMobileSample/

    This issue looks fixed with the latest SpreadJS v 12.0.3, please download the same from our website.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels