Solved

jTable adding custom buttons

Posted on 2016-10-15
1
140 Views
Last Modified: 2016-10-15
Hello experts
I m using jquery jTable and i need help to add a custom button in the pop up window for editing  one item
I found something similar to my problem that is using the display function here :
http://stackoverflow.com/questions/16747730/add-custom-button-in-jtable
This is working if list is true. If list is false (for showing this only in the pop up window , i get a textbox and not a button.
Any idea how to fix this?
 MyButton: {
                title: 'Validation Rules',
                width: '40%',
            list: false,
                display: function(data) {
                     return '<button type="button" onclick="alert()">Add</button> ';
                }}

Thank you for any help.
0
Comment
Question by:Panos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Panos earned 0 total points
ID: 41844957
I have a solution for this problem and share this here for any one else with the same problem
I modified the jsTable plugin  _createInputForRecordField function on line 1003
I added an if - else statement before //Create input according to field type code like:
 if (field.display) {
                return field.display({ record: record });
            }
                  else{
            //Create input according to field type
      ......all the stuff
}
0

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question