iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi All,
when I have the number of records more then VirtualPageSize(in my case 32) in a grid i have a java script error when i tray to retrive Expanded Grouped rows when row index is upper then VirtualPageSize(in my case 32) .
i used this function to retaining the Expanded Grouped rows.
function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) {var WebGrid1 = ISGetObject(controlId);
if (actionName == "Refresh" || actionName == "ColumnSort") {
if (expandedGroupNodes != null) {
var splitResult = expandedGroupNodes.split(";");
for (var i = 0; i < splitResult.length; i++)
WebGrid1.RootTable.GetRowByGroup(0, splitResult[i]).ExpandGroupRow();}}
return true;
}
see attached file .
Is there any solution to this issue?
Best regards
thanks
Hi,Thank you for your information code and I apologize for any inconveniences this problem may have caused you.I’ve made a sample that perhaps similar with your current scenario (based on information code). I bind the WebGrid to Northwind.mdb database and Orders table.I try to expand a couple of grouped rows, then I refresh the WebGrid. And I get a java script error as well.To fix this issue, you should modify your code in OnAfterResponseProcess function.Here I enclosed the code:
var i = 0;var intervalObj; function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) { var WebGrid1 = ISGetObject(controlId); if (actionName == "Refresh" || actionName == "ColumnSort") { if (expandedGroupNodes != null) { var splitResult = expandedGroupNodes.split(";"); intervalObj = setInterval(function () { if (!WebGrid1.IsInProgress) { if (i < splitResult.length - 1) { WebGrid1.RootTable.GetRowByGroup(0, splitResult[i]).ExpandGroupRow(); i++; } if (i >= splitResult.length - 1) { clearInterval(intervalObj); intervalObj = null; i = 0; } } }, 5); } } return true; }
Please have a review in my sample and let me hear your response.Thank you.Regards,Hans.
Hi hans,
Thanks for your suggestion, I have no java script error but i don't retrieve my Expanded Grouped rows also.
thank you
Regards
Sigma
Hi hans ,
I made a small modification in the fonction and it works partiely
var WebGrid1 = ISGetObject(controlId);
intervalObj = setInterval(
function() {
if (!WebGrid1.IsInProgress) {
if (i < splitResult.length - 1) {
var gridAndPosition = splitResult[i].split(":");
WebGrid1.RootTable.GetRowByGroup(0, gridAndPosition[1]).ExpandGroupRow();
i++;
if (i >= splitResult.length - 1) {
clearInterval(intervalObj);
intervalObj = null;
i = 0;}}}, 5);}
I retiriev Expanded Grouped rows if rowindex < the VirtualPageSize(in my case 32) else the group is collapsed.
Sigma team
Thank you for your replay .
Now it works very well.
Thank you .
Regards ,
Hi,I’m glad to hear that you have solved your issue.Should you have further question, please do not hesitate to contact us.I would be happy to help you again.Thank you.Regards,Hans.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname