Tutorial :JQuery Flexigrid question


Anyone know how to format the columns on a flexigrid?


the colModel doesn't seen to have any formatting params

I want to do simple things like format my date col with "{0:dd MMM yyyy}"


Set the process property of the column you want to format, like this:

colModel: [                  {display: "ID", name: "id", width: 40, sortable: true, align: "center", process: procMe},                  {display: "Title", name: "title", width: 180, sortable: true, align: "left"}                ],  

notice the process: procMe on the first col, and then:

function procMe(celDiv,id) {      $(celDiv).html("Some formated text/icons/pics or whatever here");  };   

I don't have a way to try it right now but i think it should work, sorry if there are any mistakes i just wrote it from memory and i might have forgotten something.

Hope it helps...


I don't think flexigrid includes formatting properties.

Can't you format the date when you are fetching the data from the server?


I agree with ToRrEs - format your data before you serialize it. This way you push down just what you need to the client.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »