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
I saw this error on here before but it doesn't seem it was addressed. I am using WebGrid 7.0.7200.
My scenario:
- I am binding my webgrid to an ObjectDataSource.- I am creating my columns dynamically in the PrepareDataBinding event. There are 80+ columns. For our scenario, let's assume the following:
visibleCol_Frozen, visibleCol_Frozon, visibleCol, visibleCol, HiddenCol, HiddenCol, visibleCol...etc.
What happens is if I scroll past where the hidden columns would be, the display screws up as you see in the attached images.
I tried the following with these two doc types:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
The latter doctype screws up my entire display in IE so it is no longer an option.
I also tried my html tag with and without xmlns="http://www.w3.org/1999/xhtml"
I really need this issue fixed please! My delivery date is nearing quickly!
Hello,Thank you for your information.To resolve this two lines issue, please try to modify your code to this code below:
grid.UnfreezePane();grid.LayoutSettings.FreezePaneSettings.MaxFrozenColumns = 4; window.setTimeout(function () { grid.FreezePane(4); }, 50)
Hope this helps. Thank you.Regards,Hans.
grid.LayoutSettings.FreezePaneSettings.ActiveFrozenColumns = columnPos;grid.FreezePane(true);
However, later on when I refresh the page, and look on the server side at that property it is still 2. Why is that?
Hello,I made two simple sample based on information that you provide.1) I bind the WebGrid to ObjectDataSource (Northwind database and Customers table).I set the column’s visibility like your current scenario. And I set the “ActiveFrozenColumns” property to “2”.But unfortunately, I can’t replicate your issue on my end.Please have a review on my sample and let me if there are configurations that I have missed.2) For your second question. Basically that is the WebGrid’s behavior. WebGrid will set the value of ActiveFrozenColumns, based on what you have initialized.Perhaps you could add some validation in WebGrid’s InitializeDataSource server side event.Here’s the example snippet validation code:
protected void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e){ if (IsPostBack) { WebGrid1.LayoutSettings.FreezePaneSettings.ActiveFrozenColumns = 4; WebGrid1.LayoutSettings.FreezePaneSettings.MaxFrozenColumns = 5; } }
Thank you.Regards,Hans.
I do this through a new column context menu item. It calls a function with these two lines of code.
In the image attached, you'll notice there are two lines for the freeze column. Any idea why?
Hello,Thank you for your reply.I am sorry for the late response.I made a simple sample based on your information.I try to run in IE 9 and Firefox 15 as well, but unfortunately I can’t reproduce you issue on my end.Please have review on my sample and let me if there are configurations that I missed.Thank you.Regards,Hans.
Thanks Hans. You did not miss anything and the sample works just fine. Still does not resolve my problem.
I was able to recreate the problem with your sample finally. I've attached a screen shot of the error.
Please let me know which feature is causing this error.
WebGrid Version 7.0.7200.533 Runtime Version v2.0.50727WebGridResources 7.0.7200.533ISNet Version 3.0.5000.1ISNet.WebUI.Resources 3.0.5000.400I'm using .NET 4.0
Hans,
I just noticed something in my sample. I was adding the columns that you created, but we manually did it, I wasn't adding the col0, col1...etc (they are being added in the InitializeDataSource event). After I added them, the grid straightened out.
I looked at my original code and that's what was happening too. My datasource returned 86 columns while I was adding 87 columns. The 87th column being a custom column I needed to added due to a requirement and I didn't need to store it in the database. When I removed the 87th column, the grid rendered just fine,.
It seems the grid needs to have the exact number of columns added to as the dataasource. I think even though, the grid should render correctly. Is this a bug? I think it should be.
Thanks very much for running through this with me Hans.
Hello,Thank you for your sample.Now, I can reproduce your issue on my end as well.It seems this issue appears due to the WebGrid still counting the width of invisible columns.I will forward this issue to our developer team and I’ll let you know if there are any updates for this issue.Meanwhile, to resolve this issue you could try to remove the invisible column from your WebGrid’s structure.
Or you could use HTML4 doctype on your page.
I am sorry for the inconvenience and thank you for your understanding.Regards,Hans.
function WebGrid1_OnAfterInitialize(controlId) { var WebGrid1 = ISGetObject(controlId); WebGrid1.RootTable.Columns[2].Width = 25; WebGrid1.RootTable.Columns[2].Resize(25); return true; }
This solution works for me.Thank you.Regards,Hans.
Hello,I try to make changes (update) the WebGrid in my sample.However, its works fine on my end.Could you please help me to modify my sample, so that I can reproduce your issue on my end?Thank you.Regards,Hans.
WebGrid1.GetSelectedObject().GetRowObject().GetCells().GetNamedItem("Gender").GetElement().attributes["ID"].value;WebGrid1.GetSelectedObject().GetRowObject().GetCells().GetNamedItem("Address").GetElement().attributes["Name"].value;
This solution will resolve the “Update Wrong Column” issue and “Misaligned” issue as well.
Please have review on my sample to see how it works.
Thank you.
Regards,
Hans.
Hans,I made the change as suggested but the problem still persists. The columns are misaligned. See attached image. I determined the cause of this was due to adding the first empty column. I need that column due to requirements.I still give the user the option to hide columns. So this bug will still occur. That's a problem for us. I tried removing the extra first column I was adding and doing some more updates on the grid. Over all it seemed to work fine, but then the misalignment came up again. See the other attached image.I can continiously recreate this problem on my end. I don't need a work around anymore. I just need this bug fixed. Can you please inform when it is possible to receive a hotfix so I can inform my customer?
Hello,So you have tried to run my sample on your end but the result is the issue still persists?I attached a video about the result of my sample, on my end. Please kindly have review on my video and let me know if there are steps that I missed.However, if can’t get the video. Please try to download the video from this link .For your information, I use ISNet.WebUI.WebGrid.dll version 8.0.7200.201 and ISNet.WebUI.Resources.dll version 3.0.5000.850.And if there is an update / hotfix for this issue, the hotfix will only available in WebGrid 8 not WebGrid 7.I am really sorry for not telling this earlier.However my work around should resolve this issue.Thank you for your understanding.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