For the first call, grid will not provide posStart or count parameters - it will call url exactly as it was provided. Parameters will be added only to auto-generated calls.
If you want to have dyn. loading, add one line to the server side code
I added dynamic_loading call but it didn’t work with render_complex_sql.
In connecter log I see it appended
COUNT(*) as DHX_COUNT
to my rather complex query (that has 2 joins), and made the query sql invalid.
and then chrome said:
It works with render_sql though, and I see the posStart and count being sent.
However, I remember reading in the docs that render_sql shouldn’t be used with complex queries. Is there anything particular to be concerned about?
Here’s the generated query that worked with render_sql:
[code]SELECT * FROM ( select /+ FIRST_ROWS(35)/dhx_table.*, ROWNUM rnum FROM (SELECT ‘dummy’ as subgrid,le.timestamp, le.tracker, le.log, USERAREA,SOURCE,FILENAME FROM event le
INNER JOIN
(SELECT max(timestamp) AS ts
FROM event
WHERE flowid=‘000815’
AND trunc(timestamp, ‘DDD’) > to_date(‘06-07-12’, ‘DD-MM-YY’)
GROUP BY tracker) maxdata
ON le.timestamp = maxdata.ts
LEFT JOIN
(SELECT
tracker
,MAX(CASE name WHEN ‘userArea’ THEN value ELSE NULL END) AS userArea
,MAX(CASE name WHEN ‘source’ THEN value ELSE NULL END) AS source
,MAX(CASE name WHEN ‘filename’ THEN value ELSE NULL END) AS filename
FROM
app
GROUP BY tracker
) ac
ON le.tracker = ac.tracker
WHERE trunc(timestamp, 'DDD') > to_date('06-07-12', 'DD-MM-YY') ORDER BY le.timestamp DESC) dhx_table where ROWNUM <= 237 ) where rnum >202[/code]
As for progress - grid provides onXLS and onXLE event for start and end of data loading, you can assign any custom handlers to them, which can show message of init progress.
Normally render_complex_sql is a solution for the case when render_sql doesn’t work.
If render_sql generates data for plain loading - there is no any benefit in using render_comples_sql
In any case we will check functionality of render_complex_sql with dyn. loading and will fix it .