Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by dave on Nov 11, 2009 03:18
open dhtmlx forum
dxtmlxGrid SQL query

Hello,

1.Is it possible load a complete SQL query to dxtmlGrid,something like this one:

$res="SELECT t_main.main_index, t_main.student_id, t_main.student_group, t_groups.group_location, t_main.student_private_name, t_main.student_last_name, t_main.mother_name, t_main.father_name, t_main.student_weight, t_main.select_degree, t_main.date_of_birth, t_main.student_age, t_main.select_kita, t_main.city, t_main.zipcode, t_main.neighborhood, t_main.street, t_main.home_num, t_main.entry_num, t_main.special_remarks, t_main.fixes, t_main.active, t_main.picture, t_pay.indextomain, t_pay.date_join, t_pay.day_train, t_pay.num_of_trains, t_pay.registration_form, t_pay.medic_app, t_pay.parents_signature, t_pay.receipt, t_pay.registration_fee, t_pay.nikayon, t_pay.january, t_pay.february, t_pay.march, t_pay.april, t_pay.may, t_pay.june, t_pay.july, t_pay.august, t_pay.september, t_pay.october, t_pay.november, t_pay.december, t_pay.pay_per_month
FROM (t_main LEFT JOIN t_groups ON t_main.student_group = t_groups.group_number) LEFT JOIN t_pay ON t_main.main_index = t_pay.indextomain
GROUP BY t_main.main_index, t_main.student_id, t_main.student_group, t_groups.group_location, t_main.student_private_name, t_main.student_last_name, t_main.mother_name, t_main.father_name, t_main.student_weight, t_main.select_degree, t_main.date_of_birth, t_main.student_age, t_main.select_kita, t_main.city, t_main.zipcode, t_main.neighborhood, t_main.street, t_main.home_num, t_main.entry_num, t_main.special_remarks, t_main.fixes, t_main.active, t_pay.indextomain, t_pay.date_join, t_pay.day_train, t_pay.num_of_trains, t_pay.registration_form, t_pay.medic_app, t_pay.parents_signature, t_pay.receipt, t_pay.registration_fee, t_pay.nikayon, t_pay.january, t_pay.february, t_pay.march, t_pay.april, t_pay.may, t_pay.june, t_pay.july, t_pay.august, t_pay.september, t_pay.october, t_pay.november, t_pay.december, t_pay.pay_per_month
ORDER BY t_main.student_group, t_groups.group_location, t_main.student_last_name;"

2.where is the option to set grid vertical lines.i mean how to show grid like excel table?

Answer posted by Alex (support) on Nov 11, 2009 04:07

Hello, 

>> Is it possible load a complete SQL query to dxtmlGrid,something like this one:

Grid is client-side component and requires data in the xml format. But you can generate the xml stream using some server-side technology. 

Also there are PHP, Java and .Net connectors that provide ready server-side solutions: http://www.dhtmlx.com/docs/products/dhtmlxConnector/index.shtml

>> where is the option to set grid vertical lines.i mean how to show grid like excel table?

The default grid style has vertical lines (to enable default skin just remove grid.setSkin(...) method in your initialization code)