$grid->render_sql(“Select FIRST_NAME,f.tabl.GEND as GENDER, b.tabl.COUNTRY as COUNTRY,CITY, c.tabl.STRTYPE as TSTREET, d.tabl.NAME_STREET as STREET from a.tabl, b.tabl, c.tabl, d.tabl, f.tabl where a.tabl.COUNTRY_LIVE= e.tabl.ID_COUNTRY and a.tabl.NAME_OF_STREET= d.tabl.ID_STR and a.tabl.GENDER= f.tabl.ID_GENDER and a.tabl.TYPE_OF_STREET= c.tabl.ID_STRT”,“”,“FIRST_NAME,GENDER,COUNTRY,CITY,TSTREET,STREET”);
grid is working and sorting work only for primary table a.tabl when i try to add sorting to b.tabl ,c.tabl, d.tabl, d.tabl or f.tabl it goes that error
SELECT * FROM ( select /+ FIRST_ROWS(100)/dhx_table.*, ROWNUM rnum FROM (SELECT FIRST_NAME,f.tabl.GEND as GENDER,B.tabl.COUNTRY as COUNTRY,CITY,c.tabl.STRTYPE as TSTREET,d.tabl.NAME_STREET as STREET FROM a.tabl, b.tabl, c.tabl, d.tabl, f.tabl WHERE a.tabl.COUNTRY_LIVE= e.tabl.ID_COUNTRY and a.tabl.NAME_OF_STREET= d.tabl.ID_STR and a.tabl.GENDER= f.tabl.ID_GENDER and a.tabl.TYPE_OF_STREET= c.tabl.ID_STRT AND CITY LIKE ‘%РОС%’ AND STREET LIKE ‘%П%’ AND NUMBER_OF_BULDING LIKE ‘%27%’ ORDER BY STREET ASC) dhx_table where ROWNUM <= 100 ) where rnum >0
oci_execute() [function.oci-execute]: ORA-00904: "STREET": invalid identifier at /www/Connector/db_oracle.php line 22
As far as I can see the problem is caused by aliaces in the original SQL, when sorting - original field name must be used, not the alias. I think you can change the sql to the next, which will work similar but will not fails for sorting.
$grid->render_sql("Select FIRST_NAME,f.tabl.GEND as GENDER, b.tabl.COUNTRY as COUNTRY,CITY, c.tabl.STRTYPE as TSTREET, d.tabl.NAME_STREET from a.tabl, b.tabl, c.tabl, d.tabl, f.tabl where a.tabl.COUNTRY_LIVE= e.tabl.ID_COUNTRY and a.tabl.NAME_OF_STREET= d.tabl.ID_STR and a.tabl.GENDER= f.tabl.ID_GENDER and a.tabl.TYPE_OF_STREET= c.tabl.ID_STRT","","FIRST_NAME,GENDER,COUNTRY,CITY,TSTREET,NAME_STREET");
field is gender in primary table, i have values “0” and “1”, at secondary is “male” and “female”.
at sample higher i use aliases to render this, but at sorting i must set the values like “0” and “1” how me to replace this values to “male” and “female” using #connector_select_filter ???
the aliases set to the values “0”=“male” and “1”=“female”.
As result at grid, i see what i need gender is “male” and “female”.
I want to use #connector_select_filter that output be from “male”, “female” and empty value and sorting by ID of table “B” “male”, “female” -> “0”, “1” in my primary table “A”
at primary table “A” gender has value “0” and “1”.
When i use #connector_select_filter at filter values is “0”,“1” for true output it must be “male”, “female”.
or render_table - if it better suits for you needs.
The main sql, which you are using for loading, need to be changed as well , you need to output just a 0 and 1 values. Client side code will automatically change such values to relative labels.
using #combo_filter as result of error i receive correct xml, but like error ;( and in combo values empty …
at server side filtering combo
$gender = new ComboConnector($res,“Oracle”);
$gender->dynamic_loading(10);
$gender->render_table(“MHC.MHC_T_GENDER”,“ID_GENDER”,“GEND”);
or something mist ???
a) place div tag in the header ( you can place any html in it, actually )
b) init combo in that div
c) attach combo to the connector
d) attach onChange event to combo and call grid.filter from it ( or reload from server with new data )
how me to filter my combo with other header values that connected to base “connector”
There is no any build in integration for such task. When some master input changed you can call