Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

jTable adding custom buttons

Posted on 2016-10-15
1
Medium Priority
?
206 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

636 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