3.2.0

grid go blank when scrolling

I am using active widget 2.0.
I have used AW.UI.Extended grid in my code. When i am scrolling in my gird, it shows blank for sometimes. to resolve this i have used virtual mode off. Switching off virtual mode scrolling problem resolved but it takes much time when i am resizing column. Please provide solutions for this. Thanks in advance
June 30,
This is how virtual mode is suppose to behave. it doesn't paint all the rows hence the blank. It only paints once the scrolling has been stopped.
Amit
June 30,
Thanks for your replay..
Can you suggest any another way which solve my both problem -scrolling and column resizing.
June 30,
No, you can only choose between smooth scrolling (all rows created) or fast rendering/resizing (only visible rows created).

If you want to modify virtual mode parameters, read this one -

http://www.activewidgets.com/javascript.forum.25010.1/grid-go-blank-when-scrolling.html
Alex (ActiveWidgets)
June 30,
Ok
Even if i have used "setVirtualMode(true)", my column doesn't resizing smoothly.
When i drag column separator, header resize first and than column data.

I have used AW.Grid.Extended and AW.XML.Table and I am populating data using XML String. I have read somewhere in forum that populating data using javascript array is much faster than XML. is it true?

June 30,
> When i drag column separator, header resize first and than column data

Yes, correct. This behavior is by design.
Alex (ActiveWidgets)
June 30,
But the difference is noticeable. It is more than 3 to 4 sec. Can we reduce time between resizing column header and column data?

And please give some suggestion on below..
>> have used AW.Grid.Extended and AW.XML.Table and I am populating data using XML String. I have read somewhere in forum that populating data using javascript array is much faster than XML. is it true?
June 30,
>> It is more than 3 to 4 sec

There must be something wrong. Normally the column resizing should be very fast. Check if this demo page works faster -

http://www.activewidgets.com/general.demos/virtual-mode.html

If it does then there must be something on your page which slows down everything.

>> populating data using javascript array is much faster than XML. is it true?

it is true, but should only be noticeable with virtual mode off (when someone decides to render 500-1000 rows in one go). On the other hand IE6 and IE7 behave very badly when loading large javascript arrays (>10Mb size) - you have to split them into smaller <script> blocks.

Check also the time to serialize the data on the server side - depending on which tools you are using it may affect page loading times even more.

If you have problems with client-side performance - it is often related to memory leaks or broken markup (or just too many elements on one page).
Alex (ActiveWidgets)
June 30,
Thanks for your prompt replay...

Please advise if anything is could be done for following code snippet for improving performance.

var obj = new AW.Grid.Extended;
var columnCount = <%=columnNameCount%>;
obj.setId("myGrid");
obj.setFixedLeft(1);
obj.setFixedRight(1);
var rowCount = 0;
var actionHeadingNumber = -1;
var headingData = '';
var dataFlag = 'false';
// define data formats
----
// CODE FOR SETTING STYLE FOR COLUMN HEADER AND COLUMN DATA DYNAMICALLY
----
var table = new AW.XML.Table;
table.setXML('<%=awXml%>');
table.setTable("//Row"); // XPath expression to select all <Row> tags.
var colArray = new Array();
for(var i=0; i<=columnCount ; i++) {
colArray[i] = "awCol" + (i);
}
<c:if test="${opModel.actionListAvail}">
colArray[columnCount] = "awCol" + (columnCount);
</c:if>
table.setColumns(colArray);

obj.setRowCount(<%=rowCount%>);
obj.setColumnCount(actionHeadingNumber+1);
obj.setCellModel(table);
obj.setSelectorVisible(false);
obj.setFooterVisible(footerVisible);
obj.setHeaderHeight(40);
obj.getHeadersTemplate().setClass("text", "wrap");
obj.onHeaderClicked = function(event, index){ return true;};
obj.onScrollTopChanged = function(value){objTop = obj.getScrollTop() };
obj.setSelectionMode("single-row");
document.getElementById("awDiv").innerHTML = obj;



Manorama
June 30,
Is there any updation on this ?
Manorama
June 30,
I don't see anything wrong with this code - looks fine.
Alex (ActiveWidgets)
June 30,

This topic is archived.

See also:


Back to support forum