I' trying to fill MIGx TV grid by select values from MIGxdb grid.
I make some configs by examples in migx config directory (selectfromgrid, showselectorgrid);
So the questions:
How to set limit = 1 for rows selection in my grid?
and how i can fill form fields in select window with column values of selected grid row?
[ed. note: ugodrus last edited this post 12 years, 7 months ago.]
I'm not completly sure what you are trying
I have tv based on Migx.
I'm trying to fill it with values from db table. By clicking on "add new" button opens form window with grid contains data of db table.
I want to get data from selected grid row and put it to tv as new row.
Posible grid is enough for my task and i dont need extra fields in editor form.
[ed. note: ugodrus last edited this post 12 years, 7 months ago.]
would it be enough to have a listbox-field (probably with typeahead for searching, if you have many entries), which stores just the id of the selected record to MIGX or would you really prefer to select from a grid?
Another option could be, to have a MIGXdb - grid - TV, where you can activate items for specific resources, which are then stored to an extra db-table.
I think selecting from grid would be better. Select column values will no require runing snippet for each tv element in frontend before page rendering because all needed data is alredy stored in tv.
Maybe there's the way to set custom ExtJs grid handler (on select). But I dont have experience in it.
I have another one question:
How can i set join type in MIGx (left join and inner join) ? I tryed to add some joins for my grid, but there's no effect. I think MIGx set them as LEFT but my joined tables requires INNER JOIN.
with the coming version, its possible to set the join-type
https://github.com/Bruno17/MIGX/commit/7f0289492ee2694c2ac261c2069d6fa8937847f0#diff-7a406b3e458fc4334f004f1ac1ae2e53L1728
[{"alias":"theAlias","type":"right"}]
possible is right, I will add inner, too, default is left
Thank you for answer and great thanks for MIGx.
It's most usefull package in modx.
Maybe you could write how or where I can add custom js handler for my grid.
are you sure, you want to get the values of the db-entry into MIGX, not only the id?
what happens, when values in the db do change?
Then they are not longer synchronized with the MIGX-entries.
Values in db will not change. I just tryin to create news line for catalogue (new items). Each news item will be published about 3-8 weeks. Deleting old items from catalogue each 3 years after deleting old orders (more then 3 years old) from db. So all data in tv will be actual all resouce lifetime. )