0

Below is the code in HTML for data-bind in datatables using knockout.js

<tbody data-bind="dataTablesForEach: {data: listtoiterate, dataTableOptions: {
                   retrieve: true,
                   jQueryUI: true,
                   paging: true,
                   ordering: false,
                   dom: '<f<t>lip>'
       }
}">
<tr>
   <td>
     <div class="custom-control custom-checkbox custom-control-inline">
         <input type="checkbox" data-bind=""                                             
              class="custom-control-input" id="chk_edit_pos">
            <label class="custom-control-label"                                                  
                for="chk_edit_pos">
            </label>
    </div>
    <span data-bind="text: abcCritical"></span>
  </td>

But If I add a div tag, as shown below, on top of the datatable just to check the values, the values are shown clearly.

<div class="tab-pane" role="tabpanel" id="tab-manage-list-dummy"
                                        data-bind="foreach: listtoiterate">
                                        <div class="col-auto">
                                            <span class="badge badge-primary m-1" data-bind="text: abcCritical"></span>
                                            <span class="badge badge-primary m-1" data-bind="text: abcDate"></span>
                                        </div>
                                    </div>
3
  • I am not sure what mistakes am making that the same is not reflecting in datatables as values Commented Jul 27, 2023 at 14:44
  • abcCritical is not defined is the error I am getting in the datatable Commented Jul 27, 2023 at 14:51
  • It's not clear what problem you are having. Commented Aug 3, 2023 at 1:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.