Spreadsheet column filter issue for fields as headers

Hello,
I've an issue when we try to apply the column filter, the spreadsheet always considers the first data row as the headers even when 'fieldAsColumnHeader' property of the sheet is set to true.

Created a playground example below:

Could you please try to apply filter on any column in above example and let me know if there is anyway we can fix this issue?

Thank you,
Goutham

1 Reply

SK Shanmugaraja K Syncfusion Team August 17, 2018 09:39 AM UTC

Hi Goutham,  
 
Thank you for using Syncfusion products.  
 
We have checked your requirement “To apply column filter without considering first row data as header” and it can be achieved by enabling “showHeader” and disabling “showHeadings” sheet property in the Spreadsheet. Please check the below code example,  
 
JS 
 
$("#Spreadsheet").ejSpreadsheet({  
    //..  
    sheets: [{  
        dataSource: data,  
        showHeader: true,  
        showHeadings: false,  
        columnCount: 5  
    }],  
    loadComplete: "loadComplete"  
});  
  
function loadComplete(args) {  
    var lastDataRowIdx = this.getSheet(1).usedRange.rowIndex + 1;  
    // To highlight the header row  
    this.XLFormat.format({ "style": { "font-weight": "bold" } }, "A1:E1");  
    // To apply the filter  
    this.XLFilter.filter("A1:E" + lastDataRowIdx);  
}  
 
 
 
Could you please check the above sample and get back to us if we misunderstood your requirement or you need any further assistance on this?  
 
Regards, 
Shanmugaraja K 


Loader.
Up arrow icon