Categories | Question details Back To List | ||||||||||||||
treegrid tooltips behavior Hi, I have a treegrid implementation with three parent levels. I'm using XML to initialize and populate the grid. I have enableToolTips defined in the afterInit section of the XML, and set true for the column(s) in question. The problem is that ToolTips work in the column cells at each of the parent levels, but not for the tree leaves level. How do I get ToolTips to work for leaf cells? Also, I'm wanting to use the #stat_tree_total_leaf filter in a footer to sum leaf values. For some undetermined reasoned the totals can change when expanding some nodes. The amounts that change have no apparent realtionship with the actual leaf values. I tried to use setFiltrationLevel to address this, but then I get a filters is undefined script error? Everything else in the grid seems to work fine, and for the most part I am using the same procedures I'm using to successfully generate 16 other grids without problems there. Thoughts, suggestions, fixes? Dave Answer posted by Support on Nov 10, 2008 02:36 Tooltip setting must work for all cells in the same column, without relation to level in hierarchy. Beware that in case of enabled tooltips - grid will show tooltips with data equal to text content of tree-cell ( or "title" attribute of cell tag ). If you are using some inline HTML content with "title" attribute , they will not be used as cell tooltip. >>For some undetermined reasoned the totals can change when expanding some nodes. If you are using some other math in grid ( for example column value based on other columns ) , then such situation may occur. Most probably you can resolve problem by using mygrid.enableSmartXMLParsing(false); >>but then I get a filters is undefined script error? be sure that next two files included on page dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js dhtmlxTreeGrid/codebase/ext/dhtmlxtreegrid_filter.js and setFiltrationLevel called only after grid.init If any of above problems still occurs - please provide any kind of sample where issue can be reconstructed ( you can send it directly to support@dhtmlx.com ) Answer posted by Dave on Nov 10, 2008 09:39 >Tooltip setting must work for all cells in the same column, without relation to level in hierarchy. I agree that Tooltip setting should work for all cells in a column regardless of level in hierarchy but that simply is NOT the case. No tooltips, default or otherwise work in the leaf level of grid for either FF or Safari. They do work on all the parent levels. Please try to offer an explanation of why this would be. I've attached a copy of the XML that's being loaded via load() function as follows: dg = new dhtmlXGridObject('accounts_grid'); dg.imgURL = dhtmlx + "/dhtmlxGrid/codebase/imgs/"; dg.setSkin("light"); //no apparent way to turn off alternating row color - this is a workaround dg.enableAlterCss('',''); xrequest = 'xsf/accounts/accounts.php?acct=load_accounts'; dg.load(xrequest, "xml"); What else is there? Is there a problem with the XML that I'm missing? Also, select behavior for leaves acts like multiselect even when multiselect is not enabled. However, this behavior is erratic in that clicking on other rows sometimes unselects already selected rows and sometimes not. >be sure that next two files included on page > dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js > dhtmlxTreeGrid/codebase/ext/dhtmlxtreegrid_filter.js >and setFiltrationLevel called only after grid.init Making sure these files were included is the very first thing I checked. I tried calling setFiltrationLevel both from script, and as I said before, in the afterInit section of the XML (currently removed from the attached file). BUT more to the point, isn't the code to loop through the filters object array defined in the included file, dhtmlxgrid_filter.js? How could I be executing the method that uses this array if the included file isn't there? I use Firebug, and it takes me to this line of dhtmlxgrid_filter.js: dhtmlXGridObject.prototype.refreshFilters=function(){ Firebug also clearly shows dhtmlxtreegrid_filter.js is loaded. Do you have other suggestions please? As I said, I've built 16 other grids of varying complexity that work fine. Let's please try to get beyond the obvious. It seems to me that these erratic behaviors may have something to do with the XML, but I'm not seeing it. It's either that or your code, right? What else is there? Thank you. Attachments (1)
Answer posted by Support on Nov 11, 2008 05:23 >>They do work on all the parent levels. In your XML data <call command="enableTooltips"> <param>,true,true,true,true,true,true,true,true,true,true</param> </call> You skipped parameter for first column which is equal to false - tooltips for first column disabled. >>Also, select behavior for leaves acts like multiselect even when multiselect is not enabled. The XML which you have provide has enableMultiselect enabled, so grid works in multiselect mode >>Do you have other suggestions please? Problem confirmed and fixed. Updated dhtmlxgrid_filter.js attached to the post. Attachments (1)
Answer posted by Dave Deniman on Nov 12, 2008 22:38 I figured out the problem for all three bugs I've been seeing. I was not defining the id attribute for the leaf rows in the XML. Seems obvious enough now, surprised you guys didn't catch that. Thanks though for your support. |