Home › Forums › Guriddo jqGrid JS › Help › Adding buttons to a field
I was wondering how I'd go about adding a field to each row of data that contained a button.
Hello,
You vcan use custom formatter for this purpose. Note that in 3.5 the custom formatter is changed.
Regards
Tony
Hi,
Im also interested in adding a field to each row that contains a button that calls an onclick that calls a javascript function.
We already have edittype button and you can use dataInit or dataEvents in editoptions. Also refer to Changes.txt how to implement this.
Best Regards
Can someone provide an example of how to do this? I'm missing how to define where the button is.
Using custom formatter
mybuttonadd = function(cellvalue, opt, roawdata) {
var mybutton = “”;
return cellval+mybutton; // or mybutton+cellvalue
}
function myfunc(id)
{
alert(id);
then you can in colModel
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS