SearchPanes > ServerSide > Requested Data

SearchPanes > ServerSide > Requested Data

ServiceSoftwareServiceSoftware Posts: 9Questions: 4Answers: 0

Should I expect that SearchPanes will send the list of columns for which SearchPanes options are requested from the server?

Or do I need to add that myself to the data request? (seems inflexible when it's defined client-side).

We use our own API rather than Editor's libraries, and I'm not understanding the sent parameters, which seem to not include SearchPanes client-side configuration (i.e. for which fields should the server send searchPanes options data)?

Looking at the Editor example, it seems that the searchPaneOptions are set there, without regard for what the client has requested (what fields are enabled for SearchPanes).

I've tried setting targets client-side and this is not transmitted in the initial payload:

            "searchPanes": {
                show: true,
                initCollapsed: true,
                dtOpts: { select: { style: 'multi' } },
                viewTotal: false,
                targets: [1, 2, 3]
            },

and I've tried setting searchPanes in columns client-side (which I prefer):

               {
                    "data": "sr", 
                    "title": "HD", 
                    "visible": false, 
                    "searchPanes": {show: true}
               }, 

but in both cases the explicit columns relevant for SearchPanes options are not sent in the payload, neither in columns nor in searchPanes object, during initial ajax (pageload) ...

    "searchPanes": {},
    "searchPanes_null": {},
    "searchPanes_options": {
        "cascade": false,
        "viewCount": true,
        "viewTotal": false
    }

When paging, then the payload for searchPanes object is not empty, but it includes all columns, not just the targets:

    "searchPanes": {
        "sr": {},
        "ss": {},
        "cty_desc": {},
        "regtown": {}
    },
    "searchPanes_null": {
        "sr": {},
        "ss": {},
        "cty_desc": {},
        "regtown": {}
    },
    "searchPanes_options": {
        "cascade": false,
        "viewCount": true,
        "viewTotal": false
    }

Answers

  • allanallan Posts: 64,150Questions: 1Answers: 10,584 Site admin

    You are correct, I'm afraid that as the moment, SearchPanes does not send the list of configured columns to the server-side. I can see that could be useful, and I will look at adding that in future (SearchPanes is indeed of a bit of an overhaul, which is on my list after the current work is finished).

    Allan

Sign In or Register to comment.