Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error grouping column with input #9

Open
slammedunc opened this issue Nov 14, 2016 · 1 comment
Open

Error grouping column with input #9

slammedunc opened this issue Nov 14, 2016 · 1 comment

Comments

@slammedunc
Copy link

slammedunc commented Nov 14, 2016

Hi,

I'm using your plugin on multiple columns in a small datatable. It all works perfectly until I try to group a column with an input in it. I get an error regarding this column - Requested unknown parameter '5' for row 0, column 5

However if I click OK on the error the table is rendered correctly. Is this a known issue? Here is my code:

var table = $("#tblVacancyRates").dataTable({ jQueryUI: true, paging: false, info: false, sort: false, processing: true, "bAutoWidth": false, "bFilter": false, "aaSorting": [], "oLanguage": { "sEmptyTable": "No trades found" }, data: listData, columns: [ { width: "25%", orderable: false, data: 'Trade.Description', name: 'trade' }, { width: "17%", orderable: false, data: 'TradeClassification.Description', name: 'classification' }, { width: "12%", orderable: false, data: 'RateCode' }, { width: "5%", orderable: false, render: function (data, type, row, meta) { var input = row.PayRate; if (row.ReadOnly === false) input = '<input type="text" class="rate" id="txtVacancyPayRate_' + row.ID + '" value="' + row.PayRate + '" />'; return input; } }, { width: "5%", orderable: false, render: function (data, type, row, meta) { var input = row.ChargeRate; if (row.ReadOnly === false) input = '<input type="text" class="rate" id="txtVacancyChargeRate_' + row.ID + '" value="' + row.ChargeRate + '" />'; return input; } }, { width: "3%", orderable: false, name: 'places', render: function (data, type, row, meta) { var input = '<input type="text" style="width:40px;" id="txtPlaces_' + row.TradeID + '" value="' + row.TradeID + '" />'; return input; } }, { width: "19%", orderable: false, data: 'VacancyComments', name: 'comments' }, { width: "6%", orderable: false, data: 'RecruitmentVacancyID', name: 'vacancyID' }, { width: "8%", orderable: false, data: 'VacancyStatus', name: 'status' }, ], rowsGroup: [ 'trade:name', 'classification:name', 'comments:name', 'vacancyID:name', 'status:name', 'places:name' ] });

The output of the input element:

<input id="txtPlaces_69601" style="width: 40px;" type="text" value="69601">

There are 8 rows and the element is identical in each.

If you need more information please let me know.

@ashl1
Copy link
Owner

ashl1 commented Aug 26, 2017

You should use ``` for code blocks Look here

The output of the input element you provided cannot be identical because it depends on row id:

<input id="txtPlaces_69601" style="width: 40px;" type="text" value="69601">
<input id="txtPlaces_69602" style="width: 40px;" type="text" value="69602">
<input id="txtPlaces_69603" style="width: 40px;" type="text" value="69603">
...

Please provide live-example similar to http://live.datatables.net/pinuxiku/1/edit It helps to understand your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants