Ajax DataGrid Support Product Page

Answered

Ajax datagrid and URL parameters

Asked 18 Jan 2013 10:34:15
1
has this question
18 Jan 2013 10:34:15 Jonas Ottosson posted:
Hi!
I have a ajax datagrid and i'm using the row behavior function to open a lightbox with more detailed information based on that specific row in the data grid. In the lightbox dialog box I have specified the URL for the detail page and I´m trying to pass two URL parameters. The problem is that in the web browser only one (the first) URL parameter works. The other is displayed as it is written in the code. I try to let them switch place with the result that it´s always the first that work properly. The last is always displayed as written in the code.

My line of code looks like this:

onrowclick: "openDMXzoneLightbox('sokandearkiv.php?IDsokande={IDsokande}&arkivartal={arkivartal}', {title:'Arkiv ', preset:'thin', group:'arkiv', plugin:'url'}, window);",

The result in the web browser is this:

.......sokandearkiv.php?IDsokande=72&arkivartal={arkivartal}

What am I missing? Any help would be appreciated!
Jonas

Replies

Replied 07 Feb 2013 09:33:19
07 Feb 2013 09:33:19 Miroslav Zografski replied:
Hello Jonas,
There are two ways of inflicting parameters -
  1. one is what you are using here
  2. the other is using 0 based indexes {0}...{n} where the indexes represent your columns in the order you have them in data grid.

  3. The first way - {nameofTheColumn} has a limitation that you are currently experiencing - can pass only one the second way don't have that limitation so in your case better use the 0-based indexes.
    Example:
    I have 4 columns : "id", "user", "email", "data". The "id" is hidden and I need to pass id and email to a link. Here is the code I would use:

    onrowclick: "openDMXzoneLightbox('sokandearkiv.php?IDsokande={0}&email={2}', {title:'Arkiv ', preset:'thin', group:'arkiv', plugin:'url'}, window);",


    Regards,
    Miro.

Reply to this topic