How to sum all the values which I enter manually inside textbox using datatable

How to sum all the values which I enter manually inside textbox using datatable

rsp180002rsp180002 Posts: 1Questions: 1Answers: 0

Hello.

I have created datatable and one entire column has textbox, where user will input their value.

render: function (data, type, row) {
return '<input class="form-control" id="itemId" name="itemId" maxlength="350" multiline="true" type="text" >';

How can I sum all those textbox?

Answers

  • colincolin Posts: 12,911Questions: 0Answers: 2,200

    This example shows how to sum the numeric data in a column, by using column().data() to get the values. For an input element, you would use cell().node() instead to get the node, then use val() to get its value.

    Colin

Sign In or Register to comment.