How i can add a number formate to datatable column

How i can add a number formate to datatable column

tanzeelanjumtanzeelanjum Posts: 5Questions: 2Answers: 0
edited December 2020 in Free community support

****I am working on datatable in Codeigniter. I want to add the number format in a View file to columns debit and credit. I am unable to get that documentation related to plugins etc. **:
My Code**
<table id="demo-table" class="table " data-url="report/ledger_list_data/<?php echo strtotime(date_to_db($start_date)); ?>/<?php echo strtotime(date_to_db($end_date)); ?>/<?php echo $clos_debit; ?>/<?php echo $clos_credit; ?>/<?php echo $chart_id; ?>" data-side-pagination="server" data-page-list="[50, 100, 200, 500, 1000, 2000, 5000, 10000]" data-pagination="true" data-show-refresh="true" data-search="false" data-show-export="true" data-show-toggle="false" data-show-columns="true" data-filter-control="true" data-filter-show-clear="true" data-show-footer="true"> * <thead> * <tr> * <th data-field="journal_no" data-align="left" data-filter-control="input" data-sortable="true"> * <?php echo "Voucher #"; ?> * </th> * <th data-field="journal_date" data-filter-control="datepicker" data-filter-datepicker-options='{"format": "yyyy-mm-dd", "autoclose":true, "clearBtn": true, "todayHighlight": true, "orientation": "top"}' data-sortable="true"> * <?php echo "Voucher Date"; ?> * * </th> * <!-- <th data-field="code" data-align="left" data-filter-control="input"> * <?php echo "Code"; ?> * </th> --> * <!-- <th data-field="name" data-align="center" data-sortable="true" data-filter-control="input"> * <?php echo "Name"; ?> * </th> --> * <th data-field="narration" data-align="center" data-filter-control="input"> * <?php echo "Narration"; ?> * </th> * <th data-field="debit" data-align="center" data-footer-formatter="totalFormatter" data-filter-control="input"> * <?php echo "Debit"; ?> * </th> * <th data-field="credit" data-align="center" data-footer-formatter="totalFormatter" data-filter-control="input"> * <?php echo "Credit"; ?> * </th> * * <th data-field="balance"> * <?php echo 'Balance'; ?> * </th> * * </tr> * </thead> * </table>)

Answers

  • tanzeelanjumtanzeelanjum Posts: 5Questions: 2Answers: 0
    edited December 2020

    .

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Sorry, I don't understand the question. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • tanzeelanjumtanzeelanjum Posts: 5Questions: 2Answers: 0

    Dear colin I just want to make a data table column value comma separated. And I am working with datatables in codeigniter. The code which I have provided in question is my View file

This discussion has been closed.