Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:custom_formatter [2011/09/17 16:50] artemeey |
wiki:custom_formatter [2017/12/12 19:13] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Custom Formatter ====== | ====== Custom Formatter ====== | ||
| You can define your own formatter for a particular column. Usually this is a function. When set in the formatter option this should not be enclosed in quotes and not entered with () - show just the name of the function.For example, | You can define your own formatter for a particular column. Usually this is a function. When set in the formatter option this should not be enclosed in quotes and not entered with () - show just the name of the function.For example, | ||
| + | |||
| <code javascript> | <code javascript> | ||
| <script> | <script> | ||
| Line 52: | Line 52: | ||
| <code javascript> | <code javascript> | ||
| <script> | <script> | ||
| - | jQuery("#grid_id").jqGrid({ | ||
| - | ... | ||
| - | colModel: [ | ||
| - | ... | ||
| - | {name:'price', index:'price', width:60, align:"center", editable: true, unformat:myunformatfunc}, | ||
| - | ... | ||
| - | ] | ||
| - | ... | ||
| - | }); | ||
| - | |||
| - | |||
| jQuery("#grid_id").jqGrid({ | jQuery("#grid_id").jqGrid({ | ||
| ... | ... | ||