jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • ganeshan_75
    Participant

    Dear Peter,

    I guess I haven’t explained you the problem well. I understand that I have to pass a function to the cellsrenderer:. The problem is JQXGrid columns value should be a JSON array. I haven’t seen any examples in your demos that you pass that array itself as a variable. All the demos I have seem are hardcoded values of the array.

    In my scenario I have to build that array in a variable. Finally that variable will have something like this

    var columnsAsString = [{“text”:”LinkTitleNoMenu”,”datafield”:”LinkTitleNoMenu”,”width”:”250″,”cellsrenderer”:”linkrenderer”}]. If I pass this the code won’t work. It will expect something like this var columnsAsString = [{“text”:”LinkTitleNoMenu”,”datafield”:”LinkTitleNoMenu”,”width”:”250″,”cellsrenderer”: linkrenderer }]. How do I get rid of the double quotes from the function name (linkrenderer) within the Jason string. If I do then the serialization fails at $.parseJSON to convert them into an array before I pass it to the JQXGrid function columns.

    I hope this is a bug in dynamic rendering of columns to this JQXGrid. If you can find a solution to get around this issue, that would be highly appreciated.

    Thanks


    ganeshan_75
    Participant

    Dear Peter,

    I got stuck with the same issue. Could you help to remove the double quotes after loading JSON. I tried different ways and it errors saying “TypeError: f.cellsrenderer is not a function”.

Viewing 2 posts - 1 through 2 (of 2 total)