Can you tell me how to include an edit/delete button for each row in a DHTMLX grid?

Currently, I am in the process of using the DHTMLX grid and I want to include an edit/delete button in every row. I have searched on Google for a solution and so far have only come across information about check boxes and links.

I would greatly appreciate any assistance with this issue. Thank you

Answer №1

If you need to customize a column type with specific HTML content, it can be easily achieved. For instance, the code below demonstrates how to create an eXcell that displays the cell value as a button with a label:

   function eXcell_customButton(cell){ //defining the eXcell name
        if (cell){               
            this.cell = cell;
            this.grid = this.cell.parentNode.grid;
        }
        this.edit = function(){}  
        this.isDisabled = function(){ return true; } 
        this.setValue=function(val){
            this.setCValue("<input type='button' value='"+val+"'>",val);                                      
        }
    }
    eXcell_customButton.prototype = new eXcell; 

To apply this custom column type in your grid, simply set the column type like this:

grid.setColTypes("customButton,...");

For more information and detailed examples, refer to the tutorial provided here:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Angular Display of Scrolling Feature not Functioning Properly

After clicking on show5 and then goto5, everything functions as expected. However, when clicking on showngo5, it does not work as anticipated, despite the fact that the same methods are being called. What is causing showngo5 to not work in this plunker h ...

I'm feeling lost on how to properly input data from an HTML form into MySql using Node.js. Can anyone provide guidance on where to begin

Can anyone provide guidance on how to start integrating my HTML page with backend code and a database? I want to create a basic login page that inserts information into a table. I'm struggling to find clear sources on this topic and would appreciate s ...

Express server is receiving undefined post parameters from Axios in Vue, even though they are clearly defined in Vue

Within my code, I am utilizing an <img> element as shown below: <img v-bind:word = "thing" @click="action" align="center" src="../assets/pic.png"/> Alongside, there is a method structured in this manner: ...

Upon submission of the form, utilize an AJAX call to display an additional form

I am looking to create a search form that, upon submission, triggers an AJAX call to render another form with an email text field and submit button. The initial form is part of a custom action in rails_admin and I also want to pass the search parameters t ...

Issues with Stylesheet Rendering in Firefox

Take a look at this Kendo UI Dojo example: https://i.sstatic.net/lVfNM.png When rendered in Firefox, the "right" should also be placed in the header, but it's not. It works correctly in IE11 and Chrome. What am I doing wrong? ...

Hover-over div's to switch them on

I am faced with a challenge involving a UL list structured like this: <ul> <li id="firstdiv">First div</li> <li id="seconddiv">Second div</li> <li id="thirddiv">Third div</li> .... </ul> Below the list, the ...

Speeding up the loading time of my background images

body { background: url(http://leona-anderson.com/wp-content/uploads/2014/10/finalbackgroundMain.png) fixed; background-size:100% auto; } I have unique background images on each of my sites, but they are large in size and take some time to load due to bein ...

Obtaining entry to an ArrayList instance

Currently, I'm working on an application that processes JSON data to generate statistics. However, I've encountered a roadblock in my progress. The JSON data structure I'm dealing with looks like this: { "position":[ { "someKey1":"s ...

Socket.IO client's socket.id updating without requiring a reconnect

In the process of creating an application, I encountered a situation where I needed to map sockets to some object. To achieve this, I relied on the socket.id variable provided by Socket.IO. However, during debugging, I discovered that the socket.id was cha ...

Tips for connecting Vue data to a dropdown menu

While diving into Vue.js, I'm encountering a puzzling issue. Despite receiving data from the server (5 records), it's not populating the <select> element properly. Instead of multiple options, all I see is a single one displaying {{dept.DNa ...

Aligning an element vertically with the surrounding text on the same line

Trying to incorporate inline input range elements in a way that aligns with the line while also aligning with the right edge of the outer div has proven to be challenging. The HTML on the site is formatted using prettify, resulting in <span> elements ...

Fade in and out effect for popups on Leaflet markers

As I delve into developing a map web app using Angular, one challenge I face is incorporating fading popups for markers. I envision these popups fading in and out on their own as per a timer, but I lack the know-how to achieve this: My current code for cr ...

Ways to organize JSON data from a fetch request into multiple divisions

I have written a JavaScript code to fetch JSON information. I plan on storing this JSON file locally (I downloaded an example file and added a birthdate object for my usage example from https://jsonplaceholder.typicode.com/users) My goal is to parse the r ...

Output the 'script' using the `document.write`

Revised inquiry I am endeavoring to construct two distinct HTML files: main.html and sufler.html. The concept is to manage the sufler.html page from main.html. To achieve this, I have devised a solution where I write the code for sufler.html as a string e ...

What seems to be the issue with this particular jQuery code not functioning as expected

I'm trying to adjust the CSS of an input field gradually over a period of 1800 milliseconds. The current function I have works, but the transition is not smooth. Should I include a fadeIn/fadeOut somewhere in my code? What might be missing from this s ...

Experiencing a ResponseStatusLine issue while trying to download a .json file from an API site

Recently, I set out to develop a small app using the Discogs API for my own personal use. The aim was to easily search for individual artists and their albums. Thanks to an unofficial Discogs C# app, I was able to achieve this successfully. However, I enco ...

How to disable the click handler of a div using only classes

Although I'm not an expert in HTML, I am eager to create a basic bootstrap button in HTML that can be enabled and disabled. My question relates to the following scenario: <div class="button" onClick=doSomething >My Button</div ...

Twofold Arrow Styling in CSS

Can someone help me achieve this design: https://i.stack.imgur.com/eBQ1a.png I am attempting to create a double arrow using just one class. I have tried various methods, but nothing seems to be working for me. If anyone has any suggestions or can point ...

What is the method for placing text underneath your background image?

click here for image I am trying to set a full viewport background image by applying it to the body tag. Currently, I have successfully achieved this with the following CSS code: body { background-image: url(/picture.jpg); } However, I also want to displ ...

Tips for printing a page to match its on-screen appearance

I am in the process of developing a scheduling page within ASP.NET Web Forms, incorporating custom CSS. I have successfully added a print button, but when I try to print the page, the CSS styles are not being applied. How can I resolve this issue? This is ...