I am creating a grid from json data.
I want to add a column to each row with a button in it.
I can create the button, but there is no text in it and I don’t know how to add a function to the button.
this is my code:
var cgiString="../cgi/t3query.exe?"+dataString
var data =
{
datatype: "json",
datafields: [
{ name: 'category'},
{ name: 'custID'},
{ name: 'assignedTo'},
{ name: 'openDate'},
{ name: 'qStatus'},
{ name: 'problem'},
{ name: 'tNumber'},
],
id: 'id',
url: cgiString
};
$("#qResults").jqxGrid({ width: '835px', height: '300px',theme:'darkblue'});
$("#qResults").jqxGrid(
{
source: data,
theme: 'darkblue',
columns: [
{ text: 'ticket#', datafield: 'tNumber', width: 60},
{ text: 'customer ID', datafield: 'custID', width: 100 },
{ text: 'problem', datafield: 'problem', width: 250 },
{ text: 'assigned', datafield: 'assignedTo', width: 80 },
{ text: 'date', datafield: 'openDate', width: 100 },
{ text: 'status', datafield: 'qStatus', width: 55 },
{ text: 'category', datafield: 'category', width: 100 },
{ text: 'action',
columntype: 'button',
type: 'bool',
cellsrenderer: function (row,column,value){
//do something on click
}}
]
});
My grid looks like this:

when the user clicks the button, I need to get the value of that row’s “ticket” column cell to pass to a function