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
Hello,
I am struggling to fix a very weird scenario during the batch update -
When changing the width of the column header the header portion of the column becomes offset from the data portion of the column.
Please have a look at the screen-shots and let me know a way to solve it.
-Udayan
Hello Udayan,
That should be not happened if you use the correct way to implement your structure. I attached my sample. As you can see even though I moved the columns, they would be still persisted after accept changes. If you have a different result, please let us know or send us your simple runable sample that replicates this issue.
Regards,Handy
Hi Udayan,
I couldn't replicate you issue in our local end. Could you let me know the steps and browser that you used to replicate this issue in our local end? Maybe to resolve this problem, you can set the width of the row OnBatchUpdateSuccess event from filterRow. But it will be more certain if I can replicate this issue in our local end so I can give you solution that might work in your project.
Regards,
Bernard
Hi Bernard,
I am using IE8 and am doing the following -
a) Databind to the Webgrid.
b) Increase the width of one of the columns by dragging the column.
c) changing the value of one of the cells of that column.
d) Clicking Accept All Changes for Batch Update.
Even if you change the position of the column (say from position 1 to 2) and do the changes in one of the cells, after batch update, the column doesnt show up under the column heading. i.e. The column list shows Column A in position 1 and Column B in position 2 but the data for column A shows below column B and so forth.
btw I am generating the view dynamically i.e. I dont have the columns listed in the design time. Also, please give me some code snippet of how to use OnBatchUpdateSuccess event.
Thanks
Udayan
I can replicate your issue here. But for this issue, I've made my workaround to set the colgroup width after you do BatchUpdate. I also attach the sample here. Could you look for my code and tell me if there's some misconfiguration on my code?
Or you use if(!IsPostBack), when you set the structure of WebGrid (if you don't want to get the WebGrid structure continously). Look forward to hear any feedback from you so I can help you further.
Great solution. I have done some changes to the client-side functions and they work absolutely fine. If you see the code, you ll find that I have done minor changes in the AfterResponseProcess. I found that actionName should be 'Refresh' and not 'BatchUpdate' because the function is fired twice once after the BatchUpdate and once when the grid retrieves the data during the refresh.
var widthCol = new Array();function BatchUpdateSuccess(controlId, hasPartialErrors, partialErrorsXml) {var WebGrid1 = ISGetObject("WebGrid1");//get header width and push it into array var headerElement = WebGrid1.GetFrameElement().children[1].children[0].children[0].children[0];for (var i = 0; i < headerElement.children.length - 2; i++)widthCol.push(headerElement.children[i].offsetWidth);return true;}function AfterReponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) {var WebGrid1 = ISGetObject("WebGrid1");//after Refresh set all the colgroup with array if (actionName == "Refresh") {var colGroup = WebGrid1.GetFrameElement().children[2].children[0].children[0];if (widthCol != null && widthCol.length !=0) {for (var i = 0; i < colGroup.children.length - 2; i++)colGroup.children[i].width = widthCol[i];widthCol.length = 0;}}return true;}
widthCol.push(headerElement.children[i].offsetWidth);
}
colGroup.children[i].width = widthCol[i];
widthCol.length = 0;
I am still not able to solve the second part of the problem. Follow the following steps -
b) Change the position of the columns. (AllowColumnMove="Yes")
c) change the value of one of the cells of one of the columns.
d) Click Accept All Changes for Batch Update.
You ll see that the column headers remain as-is but the column values come in the wrong position, as if the data and the column Name are disassociated.
Please let me know how to solve it.
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