Reputation: 426
In jQgrid, while editing i want my custom controls. for eg textbox with custom attributes. to achive this i added customformatter like below
ColModel
{ name: 'Code', index: 'Code', width: 100, editable: true, formatter : createexceltextbox },
Formatter method
function createexceltextbox(cellvalue, options, rowObject) {
return "<input type='text' value='" + cellvalue + "' style='width:100%' abc='xyz' />";
}
It converts all cells into textbox which i dont want,
I want this textbox at the time of row editing only.
Upvotes: 1
Views: 9188
Reputation: 221997
Custom formatter are used during filling the cell content and not during editing. What you need is the usage of edittype: "custom". The answer, another one (or more recent this one) or this one will provide you corresponding examples.
Upvotes: 1