Introduction
In-place editing is a trending feature that can be seen in many latest web applications, a popular example would be trello.com where the editing data happens on the web page without any explicit forms or popups. Another such example I could point out is, thoughtplan.com. The in-place editing is very nice in such a way that editing data seems so natural and user friendly.
To enable in-place editing, there are many free JQuery plugins available on the internet. We are discussing a very popular plugin called x-editable. Most of the time we use html tables to display data where in-place editing is enabled. Hence we need another plugin to elegantly display tables with enormous data. We use a famous JQuery plugin called datatable. Both of these plugins are used widely and free to use.
Assumption : Bootstrap 3, JQuery used Projects
Integration
In order to enable datatable features on any ordinary table found on web page, we should initialise datatable plugin for that table. It's simply a call on the id or class selector of the table. x-editable plugin can be initialized on each field on any table that requires in-place editing. The initialization of x-editable plugin is same as datatable plugin, i.e, id or class selector of the field should be initialized with x-editable plugin. With that you are good to go in-place editing on datatable.
Challenges
One of the many features provided by datatable is pagination. While we integrate x-editable plugin with datatable, often we forget to see how the plugin works on the rows that are hidden by the datatable pagination feature. Hence the in-place editing is not working on the paginated rows or in other words, the rows in the next page. To mitiage such issues, we will need to use the datatable plugin features or api to initialize the in-place editing on all rows hidden by pagination.
Solution
What we proposed to solve this issue is to use drawCallback function option on the datatable object so when each row is drawn, we can decide what should be done with the rows. In this case, we are trying to initialise x-editable plugin on all editable items/fields in all the rows of the datatable. Below is the drawCallback function used for this purpose on datatable object. You can see how the x-editable plugin is initialised on all editable items of all rows. We have used class name selector for the editable field/column.
In-place editing is a trending feature that can be seen in many latest web applications, a popular example would be trello.com where the editing data happens on the web page without any explicit forms or popups. Another such example I could point out is, thoughtplan.com. The in-place editing is very nice in such a way that editing data seems so natural and user friendly.
To enable in-place editing, there are many free JQuery plugins available on the internet. We are discussing a very popular plugin called x-editable. Most of the time we use html tables to display data where in-place editing is enabled. Hence we need another plugin to elegantly display tables with enormous data. We use a famous JQuery plugin called datatable. Both of these plugins are used widely and free to use.
Assumption : Bootstrap 3, JQuery used Projects
Integration
In order to enable datatable features on any ordinary table found on web page, we should initialise datatable plugin for that table. It's simply a call on the id or class selector of the table. x-editable plugin can be initialized on each field on any table that requires in-place editing. The initialization of x-editable plugin is same as datatable plugin, i.e, id or class selector of the field should be initialized with x-editable plugin. With that you are good to go in-place editing on datatable.
Challenges
One of the many features provided by datatable is pagination. While we integrate x-editable plugin with datatable, often we forget to see how the plugin works on the rows that are hidden by the datatable pagination feature. Hence the in-place editing is not working on the paginated rows or in other words, the rows in the next page. To mitiage such issues, we will need to use the datatable plugin features or api to initialize the in-place editing on all rows hidden by pagination.
Solution
What we proposed to solve this issue is to use drawCallback function option on the datatable object so when each row is drawn, we can decide what should be done with the rows. In this case, we are trying to initialise x-editable plugin on all editable items/fields in all the rows of the datatable. Below is the drawCallback function used for this purpose on datatable object. You can see how the x-editable plugin is initialised on all editable items of all rows. We have used class name selector for the editable field/column.
Code Snippets
$('#CVUsers').DataTable({ "pagingType": "simple", drawCallback: function(settings){ var api = this.api(); var csrfHeader = $("meta[name='_csrf_header']").attr("content"); var csrfToken = $("meta[name='_csrf']").attr("content"); $('.editable-action', api.table().body()) .editable({ type : 'select', source : MAKINUSCV.baseURL + '/admin/user/list/action.mk', url : MAKINUSCV.baseURL + '/admin/user/list/do/action.mk', ajaxOptions: { beforeSend: function (xhr){ xhr.setRequestHeader(csrfHeader, csrfToken); } }, success : function(response, newValue) { if (response.status == 'error') return response.msg; } }).on('hidden', function(e, reason) { if(reason === 'save') { api.rows().invalidate('dom').draw(); } }); }, responsive: { details: { display: $.fn.dataTable.Responsive.display.childRowImmediate, type: '' } } });
The above solves two issues inherent on in-place editing with datatable. First, all rows on all pages are enabled with x-editable feature, and secondly, datatable dom is updated hence the sorting or search can find the updated data after editing.
Great work! Really I enjoy to read your content and very helpful for improving myself. Keep blogging...
ReplyDeletePega Training in Chennai
Pega Course in Chennai
Linux Training in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Primavera Training in Chennai
Excel Training in Chennai
Corporate Training in Chennai
Power BI Training in Chennai
The blog shares a lot of worthy things. Keep going..
ReplyDeleteArticle submission sites
Education
Nice blog, it taught me the valuable things. Keep going.
ReplyDeleteOracle Training in Coimbatore
Best Oracle Training Institute in Coimbatore
Oracle Certification Cource in Coimbatore
Oracle Training Center in Coimbatore
Oracle Certification in Coimbatore
Oracle Training Coimbatore
This stays as one of the best and attractive post I have read yet. Great sharing this post.
ReplyDeleteSpoken English Classes in Chennai
Best Spoken English Classes in Chennai
IELTS Coaching in Chennai
IELTS Coaching Centre in Chennai
English Speaking Classes in Mumbai
English Speaking Course in Mumbai
IELTS Classes in Mumbai
IELTS Coaching in Mumbai
IELTS Coaching in Anna Nagar
Spoken English Class in Anna Nagar
iso 27001 certification services
ReplyDeleteiso 27001 certification in delhi
ISO 9001 Certification in Noida
iso 22000 certification in Delhi
iso certification in noida
ReplyDeleteiso certification in delhi
ce certification in delhi
iso 14001 certification in delhi
iso 22000 certification cost
iso consultants in noida
we have provide the best fridge repair service.
ReplyDeleteWashing Machine Repair In Faridabad
LG Washing Machine Repair In Faridabad
Videocon Washing Machine Service Centre In Faridabad
IFB Washing Machine service centre in faridabad
Samsung Washing Machine Repair In Faridabad
Washing Machine Repair in Noida
godrej washing machine repair in noida
whirlpool Washing Machine Repair in Noida
IFB washing Machine Repair in Noida
LG Washing Machine Repair in Noida
we have provide the best ppc service.
ReplyDeleteppc company in gurgaon
website designing company in Gurgaon
PPC company in Noida
seo company in gurgaon
PPC company in Mumbai
PPC company in Chandigarh
Digital Marketing Company
Rice Bags Manufacturers
ReplyDeletePouch Manufacturers
fertilizer bag manufacturers
Lyrics with music
Thanks for sharing valuable information.
ReplyDeleteDigital Marketing training Course in chennai
digital marketing training institute in chennai
digital marketing training in Chennai
digital marketing course in Chennai
digital marketing course training in omr
digital marketing certification in omr
digital marketing course training in velachery
digital marketing training center in chennai
digital marketing courses with placement in chennai
digital marketing certification in chennai
digital marketing institute in Chennai
digital marketing certification course in Chennai
digital marketing course training in Chennai
Digital Marketing course in Chennai with placement
digital marketing courses in chennai
Thanks for your valuable content, it is easy to understand and follow.
ReplyDeleteEthical Hacking Course in Chennai
Ethical hacking course in bangalore
Ethical hacking course in coimbatore
Hacking course in bangalore
Ethical hacking in bangalore
Ethical hacking training in bangalore
Ethical Hacking institute in Bangalore
Ethical hacking Training institute in bangalore
Tally Course in Bangalore
German Classes in Bangalore
Nice content and blog...Thanks for sharing, Waiting for next...
ReplyDeleteWordpress Training in Chennai
Wordpress Training Chennai
Wordpress Training Institutes in Chennai
wordpress training in Thiruvanmiyur
Wordpress Training in Velachery
Struts Training in Chennai
clinical sas training in chennai
Spring Training in Chennai
Photoshop Classes in Chennai
LoadRunner Training in Chennai
More impressive blog!!! Thanks for shared with us.... waiting for you upcoming data.
ReplyDeleteSoftware Testing Training in Chennai
software testing course in chennai
testing courses in chennai
best software testing training institute in chennai with placement
Software testing training in Annanagar
Software testing training in vadapalani
Android training in Chennai
Python Training in Chennai
Big data training in chennai
JAVA Training in Chennai
This blog gives more attractive information.i am really impressed with this blog.
ReplyDeleteAWS Training in Chennai
AWS Training in Bangalore
AWS Training in Coimbatore
AWS Training in Hyderabad
AWS Course in Bangalore
Best AWS Training in Bangalore
AWS Training Institutes in Bangalore
AWS Certification Training in Bangalore
Data Science Courses in Bangalore
DevOps Training in Bangalore
Thanks for sharing informative article with us..
ReplyDeleteQTP Training in Chennai
qtp course in chennai
best qtp training in chennai
QTP Training in Tambaram
QTP Training in OMR
LoadRunner Training in Chennai
Html5 Training in Chennai
clinical sas training in chennai
Spring Training in Chennai
Photoshop Classes in Chennai
I have to agree with everything in this post. Thanks for useful sharing information.
ReplyDeleteHadoop Training in Chennai
Hadoop Training in Bangalore
Big Data Course in Coimbatore
Big data course in bangalore
Big Data Course in Chennai
Big Data Training in Bangalore
Python Training in Bangalore
salesforce training in bangalore
hadoop training in marathahalli
hadoop training in btm
ReplyDeleteWonderful blog.. Keep Update Like this....
Ethical Hacking Course in Chennai
ethical hacking course in bangalore
ethical hacking course in coimbatore
hacking course in bangalore
ethical hacking in bangalore
ethical hacking training in bangalore
ethical hacking institute in bangalore
Software Testing Training in Bangalore
I have to thank you for the efforts you've put in penning this website. I am hoping to check out the same high-grade content from you in the future as well. In truth, your creative writing abilities has encouraged dev me to get my own, personal website now ;)
ReplyDeletepython training in bangalore | python online training
ReplyDeleteaws training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
blockchain training in bangalore | blockchain online training
uipath training in bangalore | uipath online training
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteWeb Designing Training in Chennai
Web Designing Course in Chennai
Web Designing Training in Bangalore
Web Designing Course in Bangalore
Web Designing Training in Hyderabad
Web Designing Course in Hyderabad
Web Designing Training in Coimbatore
Web Designing Training
Web Designing Online Training
wonderful article contains lot of valuable information. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeleteThis article resolved my all queries.good luck an best wishes to the team members.learn digital marketing use these following link
Digital Marketing Course in Chennai
here you can get more info about Allama Iqbal open university result data and student ID process, application tracking, BA Admission
ReplyDeleteAllama iqbal open university
Hi I am from Join Pak Navy I and I really like your work thanks for this information and keep it up you are doing good
ReplyDeleteRoster of Sindh High Court. Check complete advocate and judge wise roster sittings. You can read more about roster of Sindh High Court.
ReplyDeleteThanks for sharing informative post. Tamil typing online is the best tool to translate Tamil to English fast and easy. Tamil typing Software download | Bamini to Unicode
ReplyDelete