Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by mahesh on Nov 05, 2009 20:28
open dhtmlx forum
dhtmlx connector & dhtml grid attempt to emulate video fails

Attached is my code deleting the page filing capability. I am able to read data from the mySQL database that I have configured. I get data in column A and colum B but sorting fails, and in filter columns I get #connector_text_filter under column A and B. Also the data fails to send and update on the server.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <link href='../dhtmlxGrid/codebase/dhtmlxgrid.css' rel='STYLESHEET' type='text/css'>
        
    <script src='../dhtmlxGrid/codebase/dhtmlxcommon.js'></script>
    <script src='../dhtmlxGrid/codebase/dhtmlxgrid.js'></script>    
    <script src='../dhtmlxGrid/codebase/dhtmlxgridcell.js'></script>    
    
    <script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script>    
    
    <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script>    
    <script src='../dhtmlxConnector_PHP/codebase/connector.js'></script>
</head>

<body>
    
<div id="gridbox" style="width:632px; height:370px;"></div>
<div id="pagingArea"></div>

<script>
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.setImagePath('dhtmlxGrid/codebase/imgs/');
    mygrid.setHeader("Column A, Column B");
    mygrid.setInitWidths("100,*")
    mygrid.setColTypes("ed,ed");
    mygrid.setSkin("modern")
    
    mygrid.attachHeader("#connector_text_filter,#connector_text_filter")
    mygrid.setColSorting("connector,connector")
    
    mygrid.init();
    //mygrid.enablePaging(true,50,10,"pagingArea",true);
    //mygrid.setPagingSkin("bricks");
    mygrid.loadXML("connector.php");
    
    var dp = new dataProcessor("connector.php");
    dp.init(mygrid);
</script>
</body>
</html>

Answer posted by dhxSupport on Nov 06, 2009 05:08
Please try to switch connector's logs and check what issues occurs while sorting and filtering grid. 
$grid->enable_log("temp.log",true);
Answer posted by mahesh on Nov 06, 2009 06:36

Log file follows:

====================================
Log started, 06/11/2009 08:11:33
====================================

Ready for SQL generation
field =>
 0 =>
  0 => item_nm
  1 => item_nm
 1 =>
  0 => item_cd
  1 => item_cd
id =>
 0 => item_id
 1 => item_id
table =>
 0 => grid50000
 1 => grid50000
count => 100

Exec SQL: SELECT  COUNT(*)  FROM grid50000

Exec SQL: SELECT item_id , item_nm , item_cd FROM grid50000 LIMIT 0,100

Done in 0.0327150821686ms

 

Answer posted by mahesh on Nov 06, 2009 06:49

I also get the error below on another sample.

[06-Nov-2009 08:44:29] PHP Fatal error:  Call to a member function enable_log() on a non-object in /home/vmcrad/public_html/xgrid/dhtmlxconnector_php_video_samples/6_savedata/connector.php on line 7
[06-Nov-2009 08:46:29] PHP Fatal error:  Call to a member function enable_log() on a non-object in /home/vmcrad/public_html/xgrid/dhtmlxconnector_php_video_samples/6_savedata/connector.php on line 7

Answer posted by Stanislav (support) on Nov 09, 2009 00:38
>>but sorting fails, and in filter columns I get #connector_text_filter under column A and B
Be sure to include connector.js ( part of dhtmlxconnector package )