DataProcessor carry custom parameters?

I am using Grid and DataProcessor free versions. I am trying to pass an ID (engid) around which is not in the tables I’m rendering, but used to decide which tables to render.

The value is passed into the page which has my Grid on it, and I am trying to use the following:

mygrid.load("connector.php?connector=true&engid=$engid&dhx_filter[column]=0");
var dp = new dataProcessor("connector.phpconnector=true&engid=$engid&dhx_filter[column]=0"");

There is code in connector.php to read $_GET[‘engid’] and then choose the appropriate table to use in render_table. This works fine for mygrid.load(), but the custom parameters don’t seem to make it when called via dataProcessor()–I get an error that the index is not defined (and it’s not).

The only hint I could find was to set dp.setTransactionMode(“GET”); but that doesn’t seem to have helped.

Is this possible? And if so, how?

Thanks!

a) do not change the sending mode of dataprocessor
b) your code has a typo, it must be

var dp = new dataProcessor("connector.php?connector=true&engid=$engid&dhx_filter[column]=0"");

c) to ensure that url preserved during server side filtering|sorting ( if you plan to use them ), code must look as

mygrid.load("connector.php?engid=$engid&connector=true&dhx_filter[column]=0"); var dp = new dataProcessor("connector.php?engid=$engid&connector=true&dhx_filter[column]=0"");

place custom parameters always before connector=true

Thank you, the order was the problem–that was driving me crazy!

(the typo was converting from dynamic PHP code to the forum)

Thanks again

So my strings are now (default, no filter):

mygrid.load("connector.php?engid=1&connector=true");
var dp = new dataProcessor("connector.php?engid=1&connector=true");

and I am using filters like this:

mygrid.attachHeader("#connector_text_filter,#connector_text_filter...

And initially a filter works, but then when the page “refreshes” data the filter is completely lost.

I feel like I’m missing something! Thanks!

client side code will not change part of url before “connector=true”, so vars in that part of url must be always available, but if you are using dhx_filter[column] and have a real filter for the same column, it possible that data from real filter will override the value which was manually placed in the url.