Please help me Print and Order TableNDNguyen Duy9yAsked Dec 1, 2017, 9:15 PM EST6 answersShareLinkedInXCopy linkSaveDear all, Please see my attachment ,help me print all text area when click Print All. and Order table Thanks
Please help me Print and Order TableNDNguyen Duy9yAsked Dec 1, 2017, 9:15 PM EST6 answersShareLinkedInXCopy linkSaveDear all, Please see my attachment ,help me print all text area when click Print All. and Order table Thanks
Laxmidhar SahooRank #383 · 6.6K reputation9y agoPosted Dec 1, 2017, 11:13 PM EST0hello friendI sent the code with some modification var app = angular.module('myApp', []); app.controller('customersCtrl', ['$scope', function ($cope, $http) { $cope.names = [{ id: 1, name: "a", textprint: "a123" }, { id: 2, name: "b", textprint: "b12453" }] $cope.orders = [{ id: 1, name: "a", parentid: 0, ordernumber: 1 }, { id: 2, name: "b", parentid: 1, ordernumber: 1 }, { id: 3, name: "c", parentid: 0, ordernumber: 3 }, { id: 4, name: "d", parentid: 2, ordernumber: 1 }, { id: 5, name: "e", parentid: 0, ordernumber: 2 }, { id: 6, name: "f", parentid: 2, ordernumber: 2 }, { id: 7, name: "g", parentid: 3, ordernumber: 2 }, { id: 8, name: "h", parentid: 3, ordernumber: 1 }, ] $cope.print = print; function print(item) { var divToPrint = document.getElementById('printarea' + item); var newWin = window.open(); newWin.document.write(divToPrint.innerHTML); newWin.location.reload(); newWin.focus(); newWin.print(); newWin.close(); } $cope.Printall=function() { var divToPrint = document.getElementById('divprint'); var newWin = window.open(); newWin.document.write(divToPrint.innerHTML); newWin.location.reload(); newWin.focus(); newWin.print(); newWin.close(); } }]); STT Name Text Print Control {{ $index + 1}} {{ x.name }} {{ x.textprint }} Print Print All Table Order STT Name Parent Ordering {{ $index + 1}} {{ x.name }} {{ x.parentid }} {{ x.ordernumber }} Expect Table Order STT Name Parent Ordering 0NDNguyen Duy177 reputation9y agoPosted Dec 3, 2017, 10:10 PM EST0Thanks, But i want print content of all div with class printarea (Text Print) when Click buttom Print All,I want all content apear on a document multi pages when when Click buttom Print All.. And can you help me order the table by angularjs 0Laxmidhar SahooRank #383 · 6.6K reputation9y agoPosted Dec 3, 2017, 10:22 PM EST0The whole document take within a div and id is taken as divprint0NDNguyen Duy177 reputation9y agoPosted Dec 4, 2017, 9:33 PM EST0Please help me to order by angularjs. Thanks 0Laxmidhar SahooRank #383 · 6.6K reputation9y agoPosted Dec 4, 2017, 10:44 PM EST0sir change my(laxmidhar) function to $cope.Printall=function(){var divToPrint = document.getElementById('divprint');var newWin = window.open();newWin.document.write(divprint.innerHTML);newWin.location.reload();newWin.focus();newWin.print();newWin.close();} divprint is the main div(top div) id0NDNguyen Duy177 reputation9y agoPosted Dec 4, 2017, 10:58 PM EST0Thanks, Print I done, Please help me ordering by angular . Thanks 0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
NDNguyen Duy177 reputation9y agoPosted Dec 3, 2017, 10:10 PM EST0Thanks, But i want print content of all div with class printarea (Text Print) when Click buttom Print All,I want all content apear on a document multi pages when when Click buttom Print All.. And can you help me order the table by angularjs 0
Laxmidhar SahooRank #383 · 6.6K reputation9y agoPosted Dec 3, 2017, 10:22 PM EST0The whole document take within a div and id is taken as divprint0
NDNguyen Duy177 reputation9y agoPosted Dec 4, 2017, 9:33 PM EST0Please help me to order by angularjs. Thanks 0
Laxmidhar SahooRank #383 · 6.6K reputation9y agoPosted Dec 4, 2017, 10:44 PM EST0sir change my(laxmidhar) function to $cope.Printall=function(){var divToPrint = document.getElementById('divprint');var newWin = window.open();newWin.document.write(divprint.innerHTML);newWin.location.reload();newWin.focus();newWin.print();newWin.close();} divprint is the main div(top div) id0
NDNguyen Duy177 reputation9y agoPosted Dec 4, 2017, 10:58 PM EST0Thanks, Print I done, Please help me ordering by angular . Thanks 0
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 1, 2017, 11:13 PM EST
Table Order
Expect Table Order
Nguyen Duy177 reputationPosted Dec 3, 2017, 10:10 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 3, 2017, 10:22 PM EST
Nguyen Duy177 reputationPosted Dec 4, 2017, 9:33 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 4, 2017, 10:44 PM EST
Nguyen Duy177 reputationPosted Dec 4, 2017, 10:58 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts