Jim Shaffer Please Help


I have the same problem while dragging the column headers of the grid
its not repainting the columns unless i move my mouse over them

plz tell me how u have solved the problem

October 26,
I haven't solved it yet, I am hoping Alex will have some input for us.
Alex, this bug relates to resizing columns no repainting the grid unless you run your mouse up and down or page up and down??

Large data set.
Jim Shaffer
October 26,

How many rows? And are you using virtual paging? What is your configuration, columns/rows/etc? I have tried the grid with 10,000 rows and virtual redering turned on and did see a little hessitation in the column resize, but it definately did work correctly under those circumstances.
Jim Hunter
October 26,
yes, all my grids are using irtual rendering with an xml data island
Maybe the grid repaints itself fine if all fields have a value of 'text' or something, but pulling from my xml file, and building the grid for me causes major issues for resizing.

here is an example of my code:

style portion:

#myGrid .aw-grid-control{height:450; width:900;border:1;font:menu;}
#myGrid .aw-alternate-even{background:#eeeeee;}
#myGrid .aw-column-0 {width:100px;background-color:threedlightshadow;} /*Contract / Task */
#myGrid .aw-column-1 {width:300px;}/*Task Title*/
#myGrid .aw-column-2 {width:130px;}/*Project Controller*/
#myGrid .aw-column-3 {width:70px;}/*Tier Level*/
#myGrid .aw-column-4 {width:60px;}/*Tool*/
#myGrid .aw-column-5 {width:70px;text-align:right;}/*Lead Div*/
#myGrid .aw-column-6 {width:70px;text-align:right;}/*CRN*/
#myGrid .aw-column-7 {width:90px;}/*Prime CAN*/
#myGrid .aw-column-8 {width:100;text-align:center;}/*Start Date*/
#myGrid .aw-column-9 {width:100;text-align:center;}/*End Date*/
#myGrid .aw-column-10 {width:75;}/*Contract type*/
#myGrid .aw-column-11 {width:100px;text-align:right;}/*Negotiated Value*/
#myGrid .aw-column-12 {width:100px;text-align:right;}/*Funded Value*/
#myGrid .aw-column-13 {width:70px;text-align:right;}/*EAC Revenue */
#myGrid .aw-column-14 {width:70px;text-align:right;}/*EAC Fee*/
#myGrid .aw-column-15 {width:70px;text-align:right;}/*EAC Fee Percentage*/
#myGrid .aw-column-16 {width:100;text-align:center;}/*EAC Date*/
#myGrid .aw-column-17 {width:100px;text-align:right;}/*Prior EAC %*/
#myGrid .aw-column-18 {width:100;text-align:center;}/*Prior EAC Date*/
#myGrid .aw-column-19 {width:500;}/*Comments*/
#myGrid .aw-grid-cell {border-right:1px solid threedshadow;}
#myGrid .aw-grid-row {border-bottom:1px solid threedlightshadow;}
#myGrid .aw-mouseover-row{color:#FFFFFF;background-color:#999999;}
#myGrid .aw-grid-header,.aw-grid-footer{text-align:center;font-weight:bold;color:#000000;border:1px inset #999;background-color:threedlightshadow;}


Dim xml, xsl
Set xml = Server.CreateObject("Microsoft.XMLDOM")
Set xsl = Server.CreateObject("Microsoft.XMLDOM")

xml.async = False
xsl.async = False
rstData.Open strSQL, DataConn, adOpenStatic, adLockReadOnly, adCmdText
intRecCount = rstData.RecordCount
rstData.Save xml, 1 'adPersistXML
'to save as a viewable file
'rstData.Save Server.MapPath("new.xml"), 1 'adPersistXML

xsl.load Server.MapPath("z.xsl")

strXML = xml.transformNode(xsl)

Set xsl = Nothing
Set xml = Nothing


var table = new AW.XML.Table;

// get reference to the xml data island node
var xml, node = document.getElementById("xmlDataIsland");
// IE
if (window.ActiveXObject){
xml = node;
// Mozilla
else {
xml = document.implementation.createDocument("","", null);

// provide data XML

// define column labels
var columns = ["Contract/Task", "Task Title", "Project Controller", "Tier Level", "Tool", "Lead Div." , "CRN", "Prime CAN", "Start Date", "End Date", "Contract Type", "Negotiated Value", "Funded Value", "EAC Revenue", "EAC Fee", "EAC Fee %", "EAC Date", "Prior EAC Fee %", "Prior EAC Date" , "Issues/Comments"];

// create ActiveWidgets Grid javascript object
var obj = new AW.Grid.Extended;

var obj = new AW.Grid.Extended; // create ActiveWidgets Grid javascript object
obj.setId("myGrid"); // not necessary unless more than one grid per page

<%If intRecCount < 20 Then%>
obj.setControlSize(screen.width - 75, (25 * <%=intRecCount%>) + 50);
obj.setControlSize(screen.width - 75, 500);
<%End If%>

obj.setColumnCount(20); //Number Of Columns to display
//Header Info
obj.setHeaderCount(1); // number of fixed header rows
obj.setHeaderText(columns); // provide column labels
obj.setFooterVisible(true); //Footer Info
obj.setFooterCount(1); //number of footer rows
obj.setFooterText(columns); // provide column labels
obj.setVirtualMode(true); //Virtual Mode
obj.setFixedLeft(1); // number of fixed columns on the left side
obj.setFixedRight(0); // number of fixed columns on the right side
obj.setSelectorVisible(true); //enable row selectors
obj.setSelectorText(function(i){return this.getRowPosition(i)});
obj.setSelectionMode("single-row"); // set row selection
obj.setCellModel(table); // provide external model as a grid data source
document.write(obj); // write grid html to the page

feel free to let me know if you see something, or I can send you an xml file and the html file to render the grid with my code.
Jim Shaffer
October 26,
OK, I might have figured out why the columns are having problems resizing. I am using my grid control within an html page and within tables on that page. It appears that having the grid render in this structure is causing the problem. Hey Jim Hunter, I am guessing that your grid is on a page by itself, or you are using some kind of div tags or something???

It appears that the html on the page in which the grid resides is causing rendering problems.

Alex, I have seen other people posting information related to grid display errors when inside a form tag, or some other html element.

Any ideas on how to place the grid on a page with other content without causing the rendering problems, and without using an iframe???
Jim Shaffer
October 26,
Sorry, I have not done any server side scripting nor have I used data islands with XML. I am not sure if this is true with 2.0, but I know that in 1.0 XML data was much slower then a JS array. I would suggest that you start 'trimming' the grid to see if something unexpected might be causing your issues. I would start by removing the fixed columns, re-test. Remove the Footers, re-test, etc. See if there is one property that might be 'getting in the way' so to speak. Keep trimming until you can't trim any more. You might run accross something unexpected that is causing your problems, then you might be able to come up with a workaround or some alternative approach.
Jim Hunter
October 26,
Moving this one back to the top. Hopefully Alex can respond to my last reply.
It appears that embedding the grid in too much html causes rendering problems. My resizing issues don't exist if the grid is on a page by itself, but if i place it in an existing page within a lot of HTML, the resizing gets hosed.
Jim Shaffer
October 31,
I just ran into a similar case where putting the grid inside a compound control looses some formatting functions like setSelectorWidth. I have not yet heard back from Alex on this. I will try and post more if I find out anything.
Jim Hunter
October 31,
Alex, Any help on this one???
Jim Shaffer
November 4,
I have found the same problem consistently. If you have a grid within a table, the column resizing will not work unless you resort the column or mouseover each row. In AW 2.0 b2 I have found the problem does not occur in Netscape or Firefox, I only found the problem with IE. Jim Hunter had replied to a previous posting thinking that there was a workaround in AW 1.0, but I was not able to find it.

Rick Villela
November 8,
This problem happens whether you have 1000 rows or 2 rows. It has to do with a having a grid in a table. Wrap a table around the xml-simple.htm example and you will see this problem on IE. I have a two part workaround, but it's only until it gets fixed.

Trap the column change event for the grid
//Check for browser since this is only happening in IE
if (navigator.appName=="Microsoft Internet Explorer")
   obj.onColumnWidthChanged = function(){ this.refresh() };

The above code will cause an error, so I had to make the following change to the source code (AW 2.0 b2 \lib\grid\seperator.js - line 59):
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 = "";	//RV Comment out line 
   e = null;

I have not seen any ill effects from this, but again I think this should only be temporary until it gets fixed properly.
Rick Villela
November 9,

This topic is archived.

See also:

Back to support forum