:: Forum >>

Grid header

I ahve a grid with three header text.When i click on the separator i wan to move the data along with the header.My problem is sometimes it is moving and sometimes not.A delay is there.Pls let me know what can i do for this.This is very urgent.......Plssss
anjana
Monday, February 25, 2008
Check that you have virtual mode switched on -

grid.setVirtualMode(true);
Alex (ActiveWidgets)
Monday, February 25, 2008
thanks for ur quixk reply alex.....
ya the code is already there..
grid.setVirtualMode(true);
the problem is when i click on the separator and move it 4 or 5 rows are getting moved others will remain in the same position....don know y....
but whn i scroll down or touch the mouse it aligns correctly...
pls gimme an update on this if u know.....very urgent
anjana
Monday, February 25, 2008
Are you using the latest version?

This problem usually related to the nested tables layout around your grid. Try to simplify the layout and/or fix the html table/cell sizes. If possible please post the code sample which allows to reproduce this problem.
Alex (ActiveWidgets)
Tuesday, February 26, 2008
Alex im using CSS so whatever styles we r applying for the separator we have a separate css.and we r creating a grid object in a javascript file.....
anjana
Wednesday, February 27, 2008
and also after i move the header and scrolls the mouse everything is getting aligned properly.if we don move the mouse the data will be in the previous position only
anjana
Thursday, February 28, 2008
Hi Alex,

we r using this code in our javascript file for separator

AW.Grid.Separator=AW.System.Template.subclass();AW.Grid.Separator.create=function(){var obj=this.prototype;obj.setClass("grid","separator");obj.setEvent("onmousedown",function(event){var start=event.screenX;var self=this;var width=self.element().previousSibling.offsetWidth;var scroll=self.element().parentNode.parentNode.scrollLeft;function doResize(event){var w=width+event.screenX - start;w=w > 9?w:9;self.element().previousSibling.style.width=(w - AW.dx)+"px"}function endResize(event){var w=width+event.screenX - start;w=w > 9?w:9;var e=self.element();AW.detachEvent(e,"onmousemove",doResize);AW.detachEvent(e,"onmouseup",endResize);AW.detachEvent(e,"onlosecapture",endResize);AW.releaseCapture(e);if(AW.gecko){try{e.parentNode.parentNode.scrollLeft=scroll;self.$owner.element().focus()}catch(err){}}var id=e.previousSibling.id;if(id.match("header")){self.$owner.setColumnProperty("width",w,self.$0)}else if(id.match("topSelector")){self.$owner.setSelectorProperty("width",w)}e.previousSibling.style.width="";e=null}var e=AW.srcElement(event);AW.setCapture(e);AW.attachEvent(e,"onmousemove",doResize);AW.attachEvent(e,"onmouseup",endResize);AW.attachEvent(e,"onlosecapture",endResize);e=null;event.cancelBubble=true})};

i think the doresize function will do the resizing for grid but its not working for me.

anjana
Friday, February 29, 2008
Maybe it is related to this bug -

http://www.activewidgets.com/javascript.forum.21839.1/selector-resize-bug.html

?
Alex (ActiveWidgets)
Friday, February 29, 2008

This topic is archived.


Back to support forum

Forum search