Blank row / Data with YADCF datatable

1

I am using YADCF Datatable with ASP:GridView. Everything including column level filter is working as expected when there is some data available into Datatable. But facing issue in below mentioned case -

  1. GRIDVIEW without any data: Sometimes as per query, Oracle not returning any row. In this case YADCF Script throwing error - "http://localhost:55947/Design/js/jquery.dataTables.yadcf.js 0x800a138f - JavaScript runtime error: Unable to get property 'sTableId' of undefined or null reference occurred"

  2. We are using ROWSPAN to show custom message to user on Initial Load. Later on User can select a filter and populate Grid. Here is the code -

       If Year = "Select FY" Then
    
        gvCff.ShowFooter = False
        gvCff.DataSource = GetBlankTable()
        gvCff.DataBind()
        gvCff.HeaderRow.TableSection = TableRowSection.TableHeader
    
        Dim totalcolums As Integer = gvCff.Rows(0).Cells.Count
        gvCff.Rows(0).Cells.Clear()
        gvCff.Rows(0).Cells.Add(New TableCell())
        gvCff.Rows(0).Cells(0).ColumnSpan = totalcolums
        gvCff.Rows(0).Cells(0).Text = "Please select FY to view data or select Browse option to upload data. "
    

Here getting this error message -

"localhost:55947/Design/js/jquery.dataTables.10.min.js 0x800a138f - JavaScript runtime error: Unable to set property '_DT_CellIndex' of undefined or null reference"

After few Googling, I tried to Add Language Option in YADCF JS. But not able to fix.

<script type="text/javascript">
    $(document).ready(function () {
        $('#gvCff').dataTable({
            "zeroRecords": "Nothing found - sorry",
        }).yadcf([
            { column_number: 1 },
            { column_number: 2 },
            { column_number: 3 }]);
    });
</script>

Can anyone please help me to fix this issue?

datatables-1.10
yadcf

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0