Configurable grid with formatter

Feb 28, 2013 at 7:21 PM
Hi, Tomas. I would like to use formatters within configurable grid. Is it posible? If so, can you privide me with some snipped, please? Thank you. Tomas P.
Coordinator
Mar 1, 2013 at 8:02 AM
Hi,

Can you please explain what do you mean by "configurable grid" as this term is a little bit vague for me.
Mar 1, 2013 at 9:01 AM
Sorry, i meant grid under [Configuration Import/Export] menu item from your [jqGrid in ASP.NET MVC - Strongly typed helper] example.
Coordinator
Mar 1, 2013 at 9:57 AM
You would like to use a jqGrid built-in predefined formatter or a custom formatter?
Mar 1, 2013 at 10:57 AM
JqGridColumnFormatter from your lib.
Coordinator
Mar 1, 2013 at 11:02 AM
Yes, but is it suppose to be one of the JqGridColumnPredefinedFormatters values or your own custom formatter.
Mar 1, 2013 at 11:30 AM
At the moment predefined I think. It will be better if I describe my problem. I have Id and Name column and I would like to make the name coloumn behave as link which directs to detail view page (of couse based on Id coloumn).
Coordinator
Mar 1, 2013 at 6:04 PM
There seems to be a bug regarding this part of import/export functionality. I will have to test it and prepare a fix. I will let you know as soon as I'm done.
Mar 13, 2013 at 1:42 PM
Hi, Tomas. I was wondering If there is some progress on this issue? Thank you.
Coordinator
Mar 13, 2013 at 7:30 PM
The fix which provides suport for built in formatter in jqGrid configuration import/export scenario has been commited into repository couple day ago. If there will be nothing unexpected I should realease an updated version of library over weekend.
Coordinator
Mar 17, 2013 at 4:21 PM
The version 6.2.1 is now available via Download section and as a NuGet package. It should fix the issue with using built-in formatters in configuration import/export functionality.
Apr 28, 2013 at 1:51 PM
I am trying new version, but still not successful. If I take your example (Configuration Import/Export grid) and place $.supplierFormatter inside script section, field is still without formating. Are some changes in jqGridImport code required? Don't you have working example of configurable grid with formatters? Thank you.
Coordinator
Apr 28, 2013 at 3:54 PM
You might notice that in the earlier discussion I was asking in which type of formatter you are interested in. I was also refering only to built-in formatters in later posts. The trick is that built-in formatters are being configured by strings (and those can be easly serialized into JSON) while custom formatters are being configured with functions and JavaScript function reference can't be serialized into JSON. The limitation is implied by the jqGrid itself as its import/export functionality doesn't provide the room for setting those functions later on client-side.

In order to work around this you can extend the list of built-in formatters. Read this post where Oleg is adding dynamicLink formatter to buit-in formatters. You can add your formatter the same way and the set it for the column by enclosing its name in '', like this "'dynamicLink'".