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
We use a custom check box in our grid in the first column using the ITemplate. We need this column to be a static size of 30 pixels. However, it never stays that way no matter what we do. It usually changes when another column is manually resized or Best Fit is used.
I've recently rigged a custom row checker that's infused into the header and I'm able to reset the width on the header through javascript, e.g.,
oHeader.childNodes[0].childNodes[0].childNodes[0].style.width = "30px";
And this works. However, when I try the same with each cell in each row, it has no impact whatsoever. I get each row's cell and process it like this:
oCell.CellElement.width = "30px"; oCell.CellElement.style.width = "30px"; oCell.CellElement.style.border = "solid 1px #ff0000";
The width has no impact on the cell. I did debug into it to verify that the CellElement is the TD tag and it is.
Note that the border was just put in for testing to verify that I was updating the correct element and it shows it correctly.
I will send a video later to show the issue in more detail. In the meanwhile, any ideas? We've tried every style setting we can think of on the server side and client side withour the results we need.
We have a line on what's causing the column size issue. When the grid renders, there's a horizontal scrollbar which allows you to scroll to access columns outside the view of the entire grid. In this case, when you resize a column, it shifts everything to the right as it should.
However, we get inconsistent rendering in our environment and we don't know why. The grid comes up without horizontal scrollbars and so the grid goes into this "auto-size" mode which then tries to refit everything into the viewable area instead. So if you resize a column, it impacts all other columns.
If I reload the page, the grid will arbitrarily render in this "auto-size" mode or, eventually, renders correctly with the horizontal scroll bars. And when it does render correctly, I can't duplicate the size issue wither. So now we just need it to render correctly consistently.
However, we have another issue. When it renders correctly, it takes, for example, 2 minutes to render as opposed to just a few seconds when it's in this "auto-size" mode.
[UPDATE] Okay, I've tracked down the column size issue and it's directly related to this setting: AutoFitColumns="true"
We have this set to false in this test and it renders with the horizontal scroll bar. However, when you set it to true (in the skin file) it sizes the columns within the viewable area. You can easily duplicate this by setting it to true and then use the best fit option from the header context menu.
I found a fix for this. Some of our pages had the following HTML tag:
<html xmlns="http://www.w3.org/1999/xhtml">
So we removed the xmlns attribute and the context menu now works. Please add this to your knowledge base so anyone else having this issue can be informed they can fix it/get around it through this solution by just using <html> without the xmlns tag.
Hi Yousif,
I am sorry, but I am not able to replicate the issue, perhaps you have some settings that change the width of check box row. Here, attached is a sample that I made of WebGrid using ITemplate. Remember to put the checkbox.cs on your app_Code folder. In this sample, I have tried to resize the other column or BestFit property is used, however, the issue is not occurring. Perhaps, I am missing something. Could you modify the sample so that it will replicate the issue.
I hope it helps and please do not hesitate to ask if you have any other questions. Thank you.
Best Regards,
Andi Santoso
Okay, I've built on your sample by making it more like our environment, i.e., using a master page and webpane manager, etc.. The problem I run into now is that I can't bring up the context menus in the grid. When I right-click, it blows up with a javascript error. Please let me know if you run into the same thing.
I'm running the latest according to the Update Manager as it found no new updates as of this morning.
The grid resize issue I've narrowed down to how the grid renders. We noticed that within our environment, when the grid renders, the horizontal scroll bar doesn't show up, most of the time, for whatever reason. When this happens, the grid resizes "virtually" which causes the issue I've brought up. However, when the scrollbar is there, I can resize a column and it works great although, right now, I can't use the context menu as it crashes.
Note that the skin and stylesheets are exactly as they are in our application.
Yes, I am encountering the same issue, where I cannot open the context menu. That occurs because in your MasterPage, you are using WebPaneManager and as we know that, our Pane Manager has not supported XHTML yet.
For the column size issue, I am still having a problem to replicate it. Could you modify the attached files so that it will replicate the issue and could you send them back for me to investigate it furthermore.
I hope it helps. Thank you and have a nice day.
Forgive me, but I am confused on the "auto-size" mode part. Could you kindly send me a sample that replicate of 2 minutes to render of WebGrid, if you would not mind?
For the issue of using AutoFitColumn="True", yes, if you are using AutoFilCoumn equals to true, it will resize all the columns so that, we can see all columns without doing a horizontal scrolling of the Grid. However, if you want to set the AutoFitColumn="True" and even after we clicked on BestFit option on header context menu, the width column of CheckBox is still static, here is the workaround. We need to set that column as a row checker column by adding this line:
newColumn.IsRowChecker = true;
Andi Santoso.
Hi Andi,
We can't use the IsRowChecker since we use our own custom check boxes and row checker. So that's not an option.
As to the performance issue, I've tracked it down and will create a new post for that one. Once I have the post URL, I'll update it here for you.
[UPDATE] Here's the link to the grid performance issue post:
http://www.intersoftpt.com/Community/WebGrid/WebGrid-7---Render-Performance-Extremely-Slow-When-WebMenuBar-On-Page/
Hi Yousif, Yes, I am encountering the same issue, where I cannot open the context menu. That occurs because in your MasterPage, you are using WebPaneManager and as we know that, our Pane Manager has not supported XHTML yet....
Yes, I am encountering the same issue, where I cannot open the context menu. That occurs because in your MasterPage, you are using WebPaneManager and as we know that, our Pane Manager has not supported XHTML yet....
We need a fix for this right away please. We've invested in using WebPaneManager and it's not option to go away from this. So we need the context menus working ASAP. Can you please find a workaround so we can get these grids working? Thanks.
Please note that this problem only seems to happen when AutoFitColumns is false. The context menus work fine otherwise.
Andi, is not coming to office today because he's not feeling well today. Regarding your issue, I would forward this to our developer teams. Thank you.
Regards,Handy
Thank you Handy. This is a big one for us, so any idea how quickly we can get a patch or hot fix for this please? Also, any possible workaround you guys can come up with would be greatly appreciated.
Sorry for inconvenient. But when it is related to XHTML, we cannot do a workaround since it is not supported yet. Thank you and have a nice day.
I understand the issue with xhtml, however, this is more than inconvenient and the answer is not acceptable to us. Please escalate this. I'm getting a lot of pressure from management on this issue and I have no way to fix. Only you guys can. Thanks.
Yes, by removing the xmlns="http://www.w3.org/1999/xhtml" and leave it as <html>, that means that it works not under XHTML and it will work just fine. That is because on our WebPaneManager, it has not supported XHTML yet.
Yes, you mentioned the incompatibility with XHTML, so I'm aware of that already. If you knew that the solution I found was available, why didn't you bring it up? I made it clear how critical this is to our product and it needed to get resolved immediately.
We have clients who depend on us and we've invested in your product so we depend on you. Thankfully we've been able to create workarounds for a myriad of issues, but we can't depend on those as a permanent solution since we don't know what the next version will do. But we're working for now so it's all good. Thanks.
Thank you for your feedback. Apologize for the inconvenience that occurred. Thank you and have a nice day.
Dear Yousif,
First of all, deeply apologize for a very late respond. I just wanted to let you know that the issue has been fixed.
I have attached you the nightly build hotfix of WebDesktop. Please kindly apply this hotfix to your project. Also noted that this is a nightly build, any feedback regarding this hotfix would be really appreciated.
Thank you and have a nice day.
Thank you Andi. I should be able to get to this next week and give you feedback.
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