:: DHX Grid :: Combo not positioning properly when grid scro

Hi there,



The grid combobox is not getting positioned properly.

Video: 4shared.com/file/130851883/8 … oning.html



I am using DHX Version: dhtmlxSuite 2009 Rel.1 (DHTMLX 2.1) Professional edition build 90226/90316

DHX Grid Version: dhtmlxGrid v.2.1 Professional edition build 90316



Following is the JS code:



function int_custom(a,b,ord)

            {

                         a=a.toString().replace(/<[^>]>/g,"")1;

                         b=b.toString().replace(/<[^>]
>/g,"")1;

                         return (a>b?1:-1)
(ord==“asc”?1:-1);

            }



            userVariablegrid = new dhtmlXGridObject(‘userVariableGrid_container’);

            

            userVariablegrid.attachEvent(“onXLS”,function()

            {

    

     $(‘userVariableGridLoadinDiv’).show();

    

     });

userVariablegrid.attachEvent(“onXLE”,function()

{

     //showing the grid div and paging div after the grid xml loads succesfully

     $(‘userVariableGridLoadinDiv’).hide();

     $(‘pagingDiv’).show();

    

     });

            userVariablegrid.setImagePath(Gpath+"/js/dhtmlx/dhtmlxGrid/codebase/imgs/");

            userVariablegrid.setSkin(“light”);

            userVariablegrid.enableTooltips(“false,false,false,false,false”);    

            userVariablegrid.enableRowsHover(true,‘grid_hover’);

            userVariablegrid.enableResizing(“false,false,false,false,false”);

            userVariablegrid.enablePaging(true,<s:property value="${defaultGridRows}" />,<s:property value="${defaultNoOfPages}" />,“pagingAreaUVS”,true,“recinfoAreaUVS”); // This line is for simple paging, where pagingArea and recinfoArea are div Ids.

            

            /Changes for Grid Paging Issues, By Tejas, 10/Jul/2008 : S/

            /
Updates: To resolve the Browser Resolution Compatibility Issue; By: Tejas; Date: 18/Aug/2009: S /

            var actualHeight = getFlexibleGridHeight(340);

            userVariablegrid.enableAutoHeight(true,actualHeight,true);

            /
Updates: To resolve the Browser Resolution Compatibility Issue; By: Tejas; Date: 18/Aug/2009: E /

            userVariablegrid.objBox.style.overflowX=“hidden”;

            /Changes for Grid Paging Issues, By Tejas, 10/Jul/2008 : E/

            

            /Changes to display no. of pages from XML & Paging Customization By : Tejas, Date : 28/Jul/2008 : S/

         userVariablegrid.setPagingTemplates(“

Results Total [total]
<<
[prevpages:Previous “+defaultNoOfPages+”: ]
[currentpages:]
[nextpages:Next “+defaultNoOfPages+”: ]
>>
“,””);

            /Changes to display no. of pages from XML & Paging Customization By : Tejas, Date : 28/Jul/2008 : E/

            

            

            userVariablegrid.attachEvent(“onAfterSorting”,function(ind){

                

                 showCustomizedPaging(userVariablegrid, <s:property value="${defaultGridRows}" />);

                 });

                

                 userVariablegrid.attachEvent(“onEditCell”,function(editStage,rowId,cellIndex,newValue,oldVal){

                     

                     

                 checkEdUserVarGrid=onUserVarCellEdit(editStage,rowId,cellIndex,newValue,oldVal)

                 return checkEdUserVarGrid;

                

                 });

                

                    

            showCustomizedPaging(userVariablegrid, <s:property value="${defaultGridRows}" />);

            

            /
Updates: Enabling Multiline when page changed; By: Tejas; Date: 16/Jan/2009: S /

                userVariablegrid.attachEvent(“onPageChanged”,function(currentPageIndex,firstRowIndex,lastRowIndex){

                            

                        userVariablegrid.setSizes();

             });

            /
Updates: Enabling Multiline when page changed; By: Tejas; Date: 16/Jan/2009: E */

            

            

            userVariablegrid.attachHeader("#text_filter,#text_filter,#select_filter,#select_filter,");

            userVariablegrid.init();

            

            userVariablegrid.attachEvent(“onCalendarShow”,function(cal,id,ind){

                        cal.options.isYearEditable = true;

                        cal.options.isMonthEditable = true;

                        

                        var pos = userVariablegrid.getPosition(userVariablegrid.cells(id,ind).cell);

                        cal.setPosition(pos[1]-175,pos[0]);

            });

            

            userVariablegrid.loadXML(Gpath+"/getUserVariableGrid.action");

            

            



Please help.

What version of dhtmlxGrid do you use? Please try to update your version to the latest 2.5 version dhtmlx.com/docs/download.shtml

I am using DHX Grid Version: dhtmlxGrid v.2.1 Professional edition build 90316.
and which which files I need to replace of v2.5 beta ?


Hello,


dropdown editors are absolutely positioned and position doesn’t change when grid is scrolled. You can set onScroll event hanlder which stops editing (closes editor):


grid.attachEvent(“onScroll”,function(scrollLeft,scrollTop){


grid.editStop();


})

Hi there,

No this is not the problem. You are getting it wrong.
When I double click the cell to select value from combobox, it shows it below cell as expected. I select it and the combo gets closed.
BUT when I scroll down to some other record and I double click the cell to select value from combobox, the combobox is shown much much below.

Please help.


Please, try to use the latest 2.5 version. Here position calculation was improved.


If you want to use 2.1, you can try to update only


- for “co” cell type: dhtmlxgrid.js and dhtmlxcommon.js


- for “combo” cell type: dhtmlxcombo.js and dhtmlxcommon.js


Please, let us know if the issue is fixed. So, we can create the special patch for 2.1 version based on the 2.5 modifications

Hi there,

Actually the JS files that I have also have some patches copied into these files.
I am attaching the dhtmlxgrid.js and dhtmlxcommon.js
Please insert necessary updates in these files as I can’t completely replace these files as project is in production.
Please co-ordinate. Thanks!!!


Hello,


you didn’t answer if the 2.5 version solved the problem. But we have included the necessary modifications in the provided files. They are attached.


updated.ZIP (44.5 KB)

Hi there,

It is not working :frowning:
Will it work for coro also ?

Hi there,

Please help me in this.
The combo box is getting dislocated only when we scroll down. Any idea ?


Hello,


please provide the complete demo to recreate the issue

Hi there,

I already provided you the whole code in the previous post, but what according to you could be the reason for such behavior ?


Hello,


the code that you have provided isn’t complete demo dhtmlx.com/docs/support/what … d_demo.htm


Could you please provide a ready sample to reproduce the issue. Locally the issue isn’t recreated

Hi there,

I have attached the working demo.
Waiting for your positive reply.

Grid Combo Problem Example.rar (143 KB)


Hello,


the issue is confimed. Please, try to use attached fiels instead of originals. Locally the issue is solved with them


files.zip (49.8 KB)

Hi there,

I guess its not working with the attached files. Can you send me the example that I sent with your base files in it ???

Hi there!
I also have the same problem with combos in the grid but only on IE 8.
So if you have this problem only on this browser,use this at the beginning of your html file

Hi there Blagoj,

Thanks for the advice, but we are told not to use such meta tag.
DHX Support, Waiting for your reply.


Hello,


the sample is attached


Grid Combo Problem Example.zip (164 KB)

On the same lines there is issue related to combo positioning but this time the position falters
when the content inside the cells is big and has para tags and line breaks.
Instead of opening just below the corresponding cell it goes at the bottom of the page. PFA
Tried to find the source of the problem,
this.list.style.top=arPos[1]+this.cell.offsetHeight+“px”; on line number 154 of dhtmlxgridcell.js v2.1
arrPos[1] remains constant at 354px but offsetHeight varies depending of cells height which causes the problem.
Can’t change the version as already suggested in the post so provide me with the patch for v2.1.

Thanks