olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.71k stars 818 forks source link

Tabulator #1338

Closed PayalY closed 6 years ago

PayalY commented 6 years ago

In button click ,how to checked the cheboxes of all filter data??

This is my code :-

In tabulator this is column .I add the checkbox, { title: "Select", field: "Id", width: 42, align: "center",topCalc:Count, frozen: true, formatter: function (cell, formatterParams) { var row = cell.getValue(); return "

"; //return the contents of the cell; }, In cellclick it work correct.

I taken button

In onclick event write the following function,

function SelectFilterRecords() { $("#Indenttable").tabulator('selectRow', true); }

for that function select all the filter record but checkbox is not checked So How to checkbox is checked all the filter records??

Rodbjartson commented 6 years ago

First off, use code brackets when posting code <>. You can find them in the menu within your comment.

Secondly, I do not understand what you want.

Please provide: -The table constructor -The onClick() function

PayalY commented 6 years ago

In cell click checkbox checked and unchecked work properly.But filter records on a button click select all records but checkbox is not checked.

This is my table structure <

$("#Indenttable").tabulator({ height: 500, tooltips: true, tooltipsHeader: true, index: "Id", columns: [ // { title: "Status", field: "Status", formatter: "textarea", align: "Center", headerFilter: "input", align: "center", visible: false },

{ title: "Select", field: "Id", width: 42, align: "center",topCalc :Count, frozen: true, formatter: function (cell, formatterParams) { var row = cell.getValue(); return "

"; //return the contents of the cell;

}, },

{ title: "Part code", field: "Pcode_code", formatter: "textarea", width: 190, headerFilter: "input", align: "left", frozen:true }, { title: "", field: "indstatus", visible: true, width: 70, align: "Center", headerFilter: "input", formatter: function (cell, formatterParams) { var value = cell.getValue(); if (value == "In progress") { return ""; } else if (value == "GRN done after commitment") { return ""; } else if (value == "GRN done on/before commitment") { return ""; } else if (value == "Commited date is crossed") { return ""; } }, }, { title: "Description", field: "Pcode_Description", formatter: "textarea",width: 282, align: "left", headerFilter: "input", visible: false }, { title: "Cost Center", field: "cost", width: 70, headerFilter: "input" }, { title: "Qty UOM", field: "UOM", width: 60, headerFilter: "input" }, { title: "Status", field: "strstatus", width: 140, headerFilter: "input" , formatter: function (cell, formatterParams) { var value = cell.getValue(); return ""; }, }, { title: "Indent Date", field: "SavedOn", width: 81, align: "Center", headerFilter: "input", align: "left", sorter:"date", sorterParams:{format:"DD/MM/YY"}}, { title: "Req.Date", field: "date", width: 76, align: "Center", headerFilter: "input", align: "left" ,sorter:"date", sorterParams:{format:"DD/MM/YY"}}, { title: "Commited Date", field: "strCommitedDate", width: 76, align: "Center", headerFilter: "input", align: "left",sorter:"date", sorterParams:{format:"DD/MM/YY"}}, { title: "PO Date", field: "PODate", width: 76, align: "Center", headerFilter: "input", align: "left", sorter:"date", sorterParams:{format:"DD/MM/YY"} }, { title: "GRN Date", field: "GRNdate", width: 76, align: "Center", headerFilter: "input", align: "left",sorter:"date", sorterParams:{format:"DD/MM/YY"} }, { title: "Last Updated On", field: "UpdatedOn", width: 84, align: "Center", headerFilter: "input", align: "left",sorter:"date", sorterParams:{format:"DD/MM/YY"} }, { title: "Indent No", field: "Id1", width: 58, align: "Center", headerFilter: "input", align: "left" , formatter: function (cell, formatterParams) { var value = cell.getValue(); return ""; }, }, { title: "PO No", field: "PONo", width: 166, align: "Center", headerFilter: "input", align: "left" }, { title: "Vendor Name", field: "VendorName", width: 166, align: "Center", headerFilter: "input", align: "left" }, { title: "Indenter", field: "username1", width: 100, align: "Center", headerFilter: "input", align: "left", visible: false }, { title: "Last Updated By", field: "username", width: 71, align: "Center", headerFilter: "input", align: "left" }, { title: "Id", field: "Id", width: 43, align: "Center", headerFilter: "input", align: "left", visible: false }, { title: "Division", field: "DivisionName", width: 88, align: "Center", headerFilter: "input", align: "left", visible: false }, { title: "SCM remarks", field: "Remarks1", width: 150, align: "Center", headerFilter: "input", align: "left" }, { title: "Location", field: "location", width: 88, align: "Center", headerFilter: "input", align: "left" }, { title: "Indent Remarks", field: "PartRemarks", headerFilter: "input", width: 150, align: "left" }, { title: "Indenter's Remarks", field: "Indenterrmk", headerFilter: "input", width: 150, align: "left" }, { title: "Expected date", field: "strExpectedDate", width: 88, align: "Center", headerFilter: "input", align: "left", visible: false ,sorter:"date", sorterParams:{format:"DD/MM/YY"}}, { title: "PO Handler", field: "POhandler", width: 88, /align: "Center",/ /headerFilter: "input", align: "left",/ }, { title: "Is Assembly", field: "IsAssembly", width: 30, headerFilter: "input", formatter: function (cell, formatterParams) { if (cell.getData().IsAssembly ==1) { return "Yes"; } else return "No"; },}, { title: "Module No", field: "ModuleNo", width: 70, headerFilter: "input" }, { title: "Assembly status", field: "AssStatus", width: 88, /align: "Center",/ /headerFilter: "input", align: "left",/ editor: AssemblyEditor }, { title: "cnt", field: "cnt", width: 30, visible: false, formatter: function (cell, formatterParams) { document.getElementById("hdncnt").value = cell.getValue();

}, },

], });

Button:- <

Onclick function:- <

function SelectFilterRecords() { $("#Indenttable").tabulator('selectRow', true);

}

----- Original Message -----

From: "Rodbjartson" notifications@github.com To: "olifolkerd/tabulator" tabulator@noreply.github.com Cc: "PayalY" payal.yeola@armstrongltd.in, "Author" author@noreply.github.com Sent: Wednesday, August 15, 2018 1:05:12 PM Subject: Re: [olifolkerd/tabulator] Tabulator (#1338)

First off, use code brackets when posting code <>. You can find them in the menu within your comment.

Secondly, I do not understand what you want.

Please provide: -The table constructor -The onClick() function

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .