Ajax DataGrid Support Product Page

Multiple Tables-views added to Grid Columns Question

Asked 18 Oct 2012 18:53:25
1
has this question
18 Oct 2012 18:53:25 Master Drue posted:
Hi,
The way our data is setup in db tables is as such for example.
- listingsdb - hold general info, for example, listing id
- listing elements - hold each specific field pertaining to the listing, title, description, etc
- photos - are in another table/view

How would i add, the 3 separate tables/views to the Grid colums area? I notice that I can add columns from 1 table/view, but if i switch off to another table/view, the grid columns become blank.
Basically my thought is, If i add a column from the table/view side, to the grid column, then i should be able to keep adding other table/views.. is this not correct? or if it is, how do i do this?

Replies

Replied 18 Oct 2012 20:13:18
18 Oct 2012 20:13:18 Master Drue replied:
Hi again,
Secondly.. I have a data grid created that pulls page ID's out. I want to be able to click on the id number and it open the respective page. I attempted to set the cell behavior, which places the URL in, for example, mysite.com/index.php?pageid=
So after the equals, per the grid, i want it to pass that number to the end of the pageid=.. so would become something like, mysite.com/index.php?pageid=12345
I tried different format options, URL encode, URL raw encode and so forth, it just doesnt seem to append the ID to the end of the URL, per the data grid..
Replied 19 Oct 2012 08:17:30
19 Oct 2012 08:17:30 Teodor Kuduschiev replied:
Hello,

Quote
Basically my thought is, If i add a column from the table/view side, to the grid column, then i should be able to keep adding other table/views.. is this not correct? or if it is, how do i do this?
Ajax datagrid can only work with one table selected at time. If you need to have content from 3 different tables, then you should first create a view /you can do this in phpmyadmin or any DB management software you are using/, and then select this view in the Datagrid.

About the IDs, in the URL you need to add:
mysite.com/index.php?pageid={0}

Where {0} is the number of the datagrid column that holds your IDs. So if it is the first column you enter {0}, if it is the second column you enter {1}.. etc.

Reply to this topic