EasyUI Forum
October 03, 2025, 10:32:46 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid innerHTML rownumbers alignment problem  (Read 7892 times)
can2pic
Newbie
*
Posts: 6


View Profile
« on: May 16, 2013, 06:51:36 AM »

Hi,
I save my datagrid to a blob and download as an rtf file to view in word, this works fine except the datagrid rownumbers are not aligned with the data rows

Code:
$('#tt').datagrid({
 title:'Report',
 width:750,
 height:460,
 remoteSort:false,
 singleSelect:true,
 rownumbers:true,
 nowrap:false,
 fitColumns:true,
 toolbar:toolbar,
 url:'./json/datagrid_Intfaults.json',
 
columns:[[
        
{field:'Active',title:'Active '},
                {field:'Historic',title:'Historic '},
                {field:'Status',title:'Status',styler:cellStyler}
   ]]





function saveTextAsFile()
{  
    var textToWrite =  $('#tt').datagrid('getPanel').html();
    
    var textFileAsBlob = new Blob([textToWrite], {type:'text/plain'});
    var fileNameToSaveAs = Qn;
    var downloadLink = document.createElement("a");
    downloadLink.href = window.webkitURL.createObjectURL(textFileAsBlob);
    downloadLink.download = fileNameToSaveAs;
    downloadLink.click();    
}

});

Example of saved file, as you see the row numbers do not align with the data any suggestions how to correct this?

UpdateSave

1
2
3
4
5
Active   Historic    Status
4166      Active   b7    
4166      Active     b6    
4166      Active    b5    
4166      Active    b4    
4166      Active     b3    
4166      Active       b2    


Thanks

Paul


« Last Edit: May 16, 2013, 07:20:49 AM by can2pic » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!