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,
I have created a demo-project for you which shows the problems. Please see attached ZIP.
Please include the Intersoft framework 3.0.5000.705, WebGrid 6.0.7200.220, System.Web.Extensions.dll 1.0.61231.0, AjaxControlToolkit.dll 1.0.10606.0, AJAXExtensionsToolbox.dll 1.0.61025.0 in order to get the same results. Please also set the .NET Target Framework to 2.0.
To reproduce the problem:
Now the application crashes trying to access grdUpper.RootTable.Columns.GetNamedItem("D"). Please note that the first column is only set to Visible=false, never it's missing.
Also, this only happens if the first column is resized. If not touching this, it works.
As an additional bug, in the lower grid the slider to move between different pages doesn't work. Only the + and - buttons move the slider.
My questions:
Regards,
Eric
Hello Eric,
Regarding your first issue, I do find the workaround. Please see the modified sample. I moved some of your code in some proper events. It seems the errors persist because you used them in unproper event.
About unmoved slider issue, I suspect that the ajax request especially Asynchronus Postback caused this issue. I am still not able to narrow the main cause.If I add a simple WebGrid Paging and do some PostBack, the slider works well.Perhaps, you can help us to find the cause because you are more familiar with the scenario.
Regards,Handy
Sorry for the late respond.
I was able to reproduce the disappearing column issue on my end. Currently, I’m still checking your sent sample to find out what may cause the issue.
I’ll get back to you as soon as I found anything from the sample.
Hello Handy,
Thanks for your response. Looking at your files, I can see the following changes:
Why did you move the column creation into PrepareDataBinding event? I think Init is the correct event, as this is a one-time column initialization. Actually this would belong into the aspx file - it's just that I created this through code instead of static definition.
Regarding the move of the SetColumnCaptions and SetColumnVisibility, I'll have to test if this is viable or has any side-effects.
And for the slider problem I'm not sure how I can help you fix this problem. It just doesn't work and you can reproduce it (as far as I understood). So let me know if I need to assist somehow.
Next steps: Please check my question about the Init event for row initialisation and try to fix the slider problem. I'll have a look at the Captions/Visibility in the meantime.
Hi
I have tested your workaround as mentioned in my last post. It doesn't work:
Is this a problem with this version I'm using? I'm using the latest overnight build, not the latest public release. Or any other ideas?
I tested in WebGrid6 build 220 and it worked well. I placed the column in PrepareDataBinding because normally, we create WebGrid Column structure in PrepareDataBinding instead of Initialize.
About unmoved slider, I already said that I also can replicate it. However, I am still unable to narrow the issue. So, I also need your help to replicate the issue in more simple sample.
Hi Handy,
What do you mean with "worked well"? In my last post I mentioned for example this new bug: You resize the column header and then click on any column header to sort that column. Please see the attached screenshot. Let me know if you cannot reproduce this.
I'll try to create more samples to show you also not-refreshing header problem and maybe a smaller sample to show the slider bug. But in any case you can still start debugging the slider problem with one of your developers if you can reproduce it.
Ok, I understand your point now. Unfortunately, this is also not a bug. This is caused by incorrect logic of the codes. Previously, you have incorrect logic by putting the code in unproper event. That's why I changed it into another approach. However, I did not estimate the other validation during my evaluation of this scenario. I only intend to resolve the script error. Previously, the width was working well because it follows the column resize dynamically.After I moved the code, it won't follow the column resize dynamically, because the width itself got set again into 80px. Every postback, would set the width into 80px again in preparedatabinding. So, you would also need to find the other approach to define the width.Btw, I found a missing logic in this sample. When bound data into the WebGrid, do sorting. All data/rows would be discarded. It is because dropdownlist value is always "ND".To resolve this issue, you will need to set "PostInputControls" properties in FlyPostBackSettings properties.
So, basically in complex scenario, sometimes the issue is occured because incorrect logic or validation. But for the slider issue, I also suspect this as a bug. I need your help to replicate this issue in more simple sample.
I agree that the width problem is a minor issue. But it still needs to be addressed. When the columns get created (now in PrepareDataBinding) I have to give them a width. So if the user changes the width, how should this remain if the columns get recreated in every PrepareDataBinding? I don't see a way to achieve this by still using PrepareDataBinding the way you recommended.
I don't understand what you mean with the FlyPostBackSettings. I stepped through the whole code without this change and cannot see anywhere an access to the dropdown returning an 'ND' (when it's on a different setting). Can you explain this in more detail?
For the other problems, I'm still working on creating more samples for you.
Did you get any feedback for the slider bug already? I'm not sure if I will be able to create a smaller sample, but in case I do, I'll let you know.
On other pages I don't use the Refresh button, but it auto-refreshes when the dropdown changes (auto postback on the dropdown). On these pages the titles of the grid (only one grid there) will not get updated then.
This problem is fixed now. Before adding the new columns (now in PrepareDataBinding) I didn't call grid.RootTable.Columns.Clear() in our project (not in the sample), so the columns were added instead. And then the code in SetColumnCaptions didn't work anymore, because it had already the modified header captions.
The other problems still remain.
Your proposed change to move all code which was in SetColumnVisibility, SetColumnCaptions and column generation into PrepareDataBinding event has another unwanted side effect: The code in SetColumnVisibility doesn't work anymore.
The problem is that first the event InitializeDataSource is being called. In this event, if there is no data, one row with the text "No data available" will be filled into the grid. In SetColumnVisibility this will be detected if number of rows is one and the strings do match. (Not the best method though.)
Now before SetColumnVisibility gets called, all columns are removed and recreated. This has the effect that when the code in SetColumnVisibility accesses the grid, there is no data in the first cell.
So by moving the code into PrepareDataBinding we now have already two unwanted side effects (empty grid detection doesn't work anymore and the column resizing problem). I think this moving wasn't the best idea.
Either we need to fix all occurring side-effects of this change or we have to find another solution to fix the initial problem (disappearing columns yielding to a crash).
Also the non-working slider issue is still open, not sure if this is related or not.
I understand. I tried to follow the logic and behaviour of this sample, but still unable to find the proper way due to the complex scenario.However, I recreate the page and use a different way for this sample.I create the sample without UpdatePanel or FullPostBack at all. Please try to run my sample. It is using all FlyPostBack request. The response is faster. All of the codes are also placed in correct event.Please let me know if you like this approach or not. Any feedback regarding this approach are welcome.
Regarding the slider issue, I succeed to find what caused this issue. I will report this to our developer teams.
Thanks for this modified sample. You made many changes there.
Things I found:
Page.RegisterHiddenField doesn't compile (I replaced it by ClientScript.RegisterHiddenField)
grid.RetrieveStructure in both PrepareDataBinding event handlers doesn't work for me. I added column creation code there instead.
The current setting of the dropdown must change the captions of the columns in both grids. In my original sample this was implemented, but I think the captions were set in a way that it didn't really change. So you probably overlooked this. I'm trying to add this to your changed code, but I'm not sure how to do so. Right now my code doesn't work this way.
In reality changing the dropdown and pressing Refresh takes a minute or so (to get the data). That's why we implemented the Refresh button. But if the user changes the dropdown and forgets to press the Refresh button, the current screen reflects data that is not true; the values in the grid don't match the dropdown selection. That's why in my sample I set the grids to invisible and only the Refresh button sets them back to visible due to a refresh. I'll try to implement this also again into your sample.
Also the functionality that if no data is in the grid, then all columns should be set to invisible except the first column. The first column should be extended to fill the whole screen (lets say fixed 500px). As soon as the grid is refreshed with data, the missing columns should get visible again and the size of the first column readjusted to it's default size.
I'll have to look a little closer at the changes, but maybe you can tell me right away how to implement these now missing features.
Ok, I will try to help you but as far I run your sample, it does not reflect some of your statement.
Unfortunately, I don't see 'set caption' is working in your sample. I knew that you set 'set caption' in your code, but it just does not reflect when running the sample.Perhaps, you can show me if I am missing or mistaken this point. With this way, I can know which part should I modify the sample.
Ok, you can let me know the progress. In my modified sample, I already compared with your sample.I tried to load the same data and not sure which data that not true. Did you mean this only in other scenario?
Well, same as my previous comment. Even though you said that some columns should be set to invisible where is no data available, unfortunately , this is also not reflected in your sample. My modified sample only follows how your current sample work. If I am missing or mistaken in some parts, please let me know. I will gladly to help you.
In my original samples this was all working, but because I didn't pay attention to this, it was set up in a way that you can easily overlook it. Here is how to see this functionality in my original sample:
- The "set both grids invisible" when the dropdown changes (until the user presses Refresh button) was fully functional. Please look again.
- The feature to change the column with of the first column to full width was implemented. But because I changed the columns, the description column was not the first column anymore. In grdUpper_Init and grdLower_Init, please move the AddGridColumn call for the Description to the beginning. Otherwise other columns will be first and in SetColumnVisibility the first code line will not detect the text (it checks tbl.Rows(0).Cells(0).Value).
- The feature to change the column captions was functional. It changes everything with XXX to the value of the currently selected dropdown. But no caption was XXX, so you couldn't see it. In grdUpper_Init and grdLower_Init please change in the call to AddGridColumn the fourth parameter from "A" to "A-XXX" and the same for all three others. (AddGridColumn(grdUpper, "A", "A", "A", ... to AddGridColumn(grdUpper, "A", "A", "A-XXX", ... and the same for A, B, C, D).
I hope you can see that this was working previously. But sorry, that I didn't mention this explicitely. If you can help getting my initial sample working without losing any functionality but removing the crash with the disappearing columns, it would be great.
And do you have any feedback from the developers related to the slider problem already?
Thanks,
Looking through my initial code again, I saw that the problem (the disappearing of the columns) in the WebGrid happens between Page.OnInitComplete and Page.OnPreLoad. Actually within the internal method Page.ProcessPostData, where ISNet.WebUI.WebGrid.DLL!ISNet.WebUI.WebGrid.WebGrid.LoadPostData is being called.
You told me that I should change my code to move it to another event. Maybe that would be a good way to start, but actually I don't find any documentation that I cannot use the code in the events I used at the beginning. This solves all my problems, except that WebGrid suddenly drops some columns.
As long as I am not doing anything that's not allowed according to the documentation of the WebGrid, I don't expect such a behaviour. Otherwise it's a bug either in WebGrid or in the documentation. Can you check which of the two please?
So how should we go on? Do you still think we should try to fix all side-effects of changing the code by using the PrepareDataBinding event? Or wouldn't it be better to stick what we have and try to fix the problem with the WebGrid?
And what about the confirmed bug with the slider? Any news there?
To reformulate my initial query, what I need is a sample with the following requirements:
If you find any way to implement all these features, I'll go that way and forget about what I initially wrote.
I modified the sample. However, there are several things that I need your confirmation.
dropdown for a filter selection for 1-2 webgrids below, aside with a Refresh button, which updates the content of the webgrids belowWhen changing the dropdown selection, the webgrids should immediately dissappear or be optically visible as invalid, even when the usual refresh takes much longer. Loading the data for the second (or the only) grid takes about 30 seconds from the database.
You can Hide it when change the dropdown and refresh the Grid with timeout.
When the Webgrid contains no rows, it should be displayed somehow. Preferably by inserting a single row, expanding the first column to the whole screen width (and all other columns hidden). As soon as there is data in the grid, the width should be reset to default width.In case of two WebGrids, when selecting a row in the first grid, the second grid should update its content. This grid should also show the functionality mentioned above with the "no data"When changing the filter dropdown, the header (caption) values of the columns must change, depending on the selected dropdown value (in case of two grids for both).For the two-grid scenario selecting the "no data" row in the first grid must not update the second grid. And if nothing is selected in the first grid, the second grid must display "no data".
In your previous sample, WebGrid2 can load data when click on single row (no data) from WebGrid1.So, do you want WebGrid2 show no data as well when click single row (no data) from WebGrid1?If yes, I already add some validation.About change caption and width, I am a little confuse about this.
When you change a dropdown value, shouldn't WebGrids become invisible? So, what change caption need for? Also, didn't WebGrid1 Column show as well the value of dropdown?I know that maybe I am missing the point for WebGrid2, but can you help me?If you have a working sample that shows this scenario, can you send me a recording video?Fyi, your previous sample did not reflect this scenario.
About the slider issue, I haven't received any news from our developer teams. I will contact them and let you know asap.
Attached is the original sample with the fixes I mentioned in one of the above posts.
First to your modified code. The hiding of the grids when changing the dropdown works there. You implemented this totally different (I used JavaScript instead), but it works. I have to look a the details yet, but this issue seems to be solved.
Regarding your question about what data should show in what grid. Well, actually if the upper grid is empty, then the lower one should also be empty. But this is just a detail. If you click on a node that is not a leaf-node, then the bottom grid should also be empty. But forget about that. This will be implemented automatically by the data that comes from the database. I will take care of this.
Confusion about change caption and width: When the dropdown changes, yes, the grids become invisible. That's correct. But after the refresh, the grids should have new captions, matching the selection. Please see my initial sample, included in this post again, but this time with this feature working. When you select in the dropdown "data with columns ABC" and press Refresh, you get three columns: A - PD1, B - PD1, C - PD1. The PD1 is the value from the dropdown. When you select a row, you get the same PD1 in all captions of the lower grid as well. If you select "full data (3)" in the dropdown and press Refresh, you get FD3 in both grids as a caption.
And for the column width, now in my attached sample also working, if you select "No data in upper grid" and press Refresh, you get only the Description column, widened to the whole screen and no other columns. If you select "data with columns ABC" in the dropdown, the Description field has normal width again and the other columns reappear. But the lower grid remains empty as long as nothing is selected in the upper grid, so the lower grid still has this full-width Description column and the other columns invisible. Let me know if you still need screenshots or so to see this feature.
Now if I compare this with your latest sample, then these two features (caption changing and column width/invisibling) are removed/non-working in your sample. So we have to re-add those features again. Please remember for any change that you cannot look at the dropdown value if there is data or not. If there is data or not is decided by the database, or in other words in the event handler InitializeDataSource. So don't add code like IF ddl.Value="ND" anywhere outside the InitializeDataSource event handler.
Any ideas on how to restore the removed features again?
Here, I modified your sample by using my apporoach. Hope this helps.Please let me know if I am missing something.
Thanks for your new sample. At first sight it seems to fulfill the requirements of the original sample.
But after a closer look I saw that you implemented code in the InitializeColumn event for both grids. There you set the width of the first column according to the selected dropdown value. This is not possible.
The value of the dropdown may only be used to pass it to the database when getting the data. What you are doing here is actually hardcoding the database result. If I would have to implement it this way, I would need a second database call in both InitializeColumn events. As mentioned, the database call takes 30 seconds or longer. If I add unnecessary database calls at other places again, this will greatly reduce performance to make the page unusable.
Therefore we need to cache the database result somewhere until we set the column width. What you try to do here (set the width in InitializeColumn) is probably not possible, because at the time where the column gets initialized, we didn't call the database (InitializeDataSource event) yet. So I still think we have to make several changes to get this working. Any ideas on how to resolve this?
I need more time to investigate this scenario. I will let you know as soon as possible. Please bear with me.
Ping
Hi Eric,
I still need a little time to figure out the scenario. Fyi, the slider issue has been fixed. We will release the fix in the short time.
Any update? And what about the slider fix?
The slider issue has been fixed as I told you before. However, I remembered that you're using WebGrid 6.We have discontinued to support WebGrid 6 which means there would be no longer hotfixes for this product.I suggested you to upgrade into WebGrid 7 for the slider issue.
Ok, I will talk with my line manager to see if we will buy the upgrade.
But what about the main problem with the crash when resizing columns? Are you still investigating this issue? Or is this also fixed in version 7 already?
The slider issue has been fixed in WebGrid 7 hotfixes.
But after a closer look I saw that you implemented code in the InitializeColumn event for both grids. There you set the width of the first column according to the selected dropdown value. This is not possible. The value of the dropdown may only be used to pass it to the database when getting the data. What you are doing here is actually hardcoding the database result. If I would have to implement it this way, I would need a second database call in both InitializeColumn events. As mentioned, the database call takes 30 seconds or longer. If I add unnecessary database calls at other places again, this will greatly reduce performance to make the page unusable.
Actually, I am a little confused about this. I still could not figure out another way.If I am not mistaken, you also set the Caption column based on DropDownList value, right?Also, In my current sample, I am not sure If it would be called to database again.In the page load, the value of DropDownList should be only called once, except in FullPostBack mode.
My approach does not require FullPostBack or use Ajax Update Panel.When change the dropdown value, the changes would be saved in a hidden field from client.So, I don't think it would be another unnecessary database calls again in DropDownList.
The problem is this: The dropdown is a filter setting for the grid. What selection the user made is also shown in the grid column titles (header). No database call is necessary for that - it's just shown there. The grid data itself comes from the database and depends on the dropdown selection. You cannot predict what data will be returned from the database just by looking at what selection the dropdown is. You are doing this in your sample.
When there is no single row returned from the database, then I create an artificial row, containing the text "no data available" in the first field and expand the field size to the whole screen width.
In your sample you are just checking if the dropdown is on position ND and in that case you set the width of the first column to full-screen width or normal. But you cannot know if the database will return any data just by checking the position of the dropdown. You have to make a database call. And this means you are actually using two calls - one for the width setting here and the second one to actually fill in the data.
I hope you can see the problem now.
Attached is your sample slightly modified. Now the database returns no rows every 30 seconds (see code). Also I included a two-seconds delay into the "database call". This way you can see that two calls are necessary and how slow it is. Also the initial view doesn't reflect the empty-status (the width is wrong). If you look at this sample, you can see the following:
any update?
I still need a little time to investigate the issue. I will let you know asap.
After debug your project, I have got two conclutions.
Refreshing time should be 2 x cDelay (once for each grid) -> wrong, takes longer, because two calls are being madeAfter refreshing, sometimes no data will be returned and special row with text "no data" shows up in Description column and all other columns are hidden -> wrong
In my analysis, the delay already take much longer than expected. I noticed that you set delay twice, one from client and one from server. I can also see that you use some boolean (IsTimeOdd). I don't think this is the correct validation. The boolean status is also changed randomly depends on the time. I think this the once cause issue when returning data. Sometimes, you can see data, sometimes not.
After refreshing, sometimes no data will be returned and special row with text "no data" shows up and uses full width -> wrong
You have incorrect validation. If you debug, the rows count is not 0 at the first time.
Hi Eric,After debug your project, I have got two conclutions.Refreshing time should be 2 x cDelay (once for each grid) -> wrong, takes longer, because two calls are being madeAfter refreshing, sometimes no data will be returned and special row with text "no data" shows up in Description column and all other columns are hidden -> wrongIn my analysis, the delay already take much longer than expected. I noticed that you set delay twice, one from client and one from server. I can also see that you use some boolean (IsTimeOdd). I don't think this is the correct validation. The boolean status is also changed randomly depends on the time. I think this the once cause issue when returning data. Sometimes, you can see data, sometimes not.After refreshing, sometimes no data will be returned and special row with text "no data" shows up and uses full width -> wrongYou have incorrect validation. If you debug, the rows count is not 0 at the first time.Regards,Handy
Why do you think I have two delays? As you can see in the code, the Sleep(cDelay) is used only in the two database calls. The problem is that the database calls are called too often. They should only be called once each.
I don't know what you mean with "I have incorrect validation."
So what I mentioned what is not working are these issues:
The problem is that with your proposed solution I have two database calls, which is not acceptable. Also the full-width "no data" display doesn't work.
You wanted to have another look to fix these issues. In my original solution everything was working, except that the grid crashed sometimes because some columns disappeared. So what I need is either a fix or workaround for this crash or a solution for all new problems with your workaround.
Can you please have another look and give me a solution?
Protected Sub grdUpper_InitializeColumn(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.ColumnEventArgs) Handles grdUpper.InitializeColumn If e.Column.Name = "Description" Then If DatabaseCall(_tblName).Tables(0).Rows.Count() = 0 Then e.Column.Width = cWidthFull End If End If End Sub Protected Sub grdLower_InitializeColumn(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.ColumnEventArgs) Handles grdLower.InitializeColumn If e.Column.Name = "Description" Then e.Column.AggregateFunction = AggregateFunctions.Custom e.Column.FooterText = "Count: " If DatabaseCallLower(grdUpper.SelectedRowKeyValue).Tables(0).Rows.Count() = 0 Then e.Column.Width = cWidthFull grdLower.RootTable.Columns.GetNamedItem("A").Visible = False grdLower.RootTable.Columns.GetNamedItem("B").Visible = False grdLower.RootTable.Columns.GetNamedItem("C").Visible = False grdLower.RootTable.Columns.GetNamedItem("D").Visible = False End If End If End Sub
The row counts is not 0, but 1. That's why the grid does not keep the full width.Regarding the solution for your scenario, I will try to talk more with our developer teams.
You're right, this detection didn't work. Actually adding this special row doesn't belong in the database function. But for this example we can still leave it like this and just improve the detection. I updated my sample (not included here).
But the main problem still remains: We have two slow database calls instead of only one. I imagine we could improve this. One call is only to detect if no rows are returned and this call could be optimized by the database and just return a boolean. This might be faster than the other call.
But even then, this design won't work: If the database data changes between the two calls, we get unexpected results. You can experience this even with my little sample, as the data changes over time.
So we have to find a way to avoid a second database call. As you already mentioned, you will talk with your developer teams. This is probably the best way to go on. Let me know what you found out.
Ok, I understand what do you mean. Even though, I managed to give you another way, you still need to apply it to your scenario and sometimes, there are some changes which can break or change your current application.I will talk with our developer teams to discuss which the best way to help you.
Any updates?
ping
I am sorry for the late response. The project has been forwarded to our developer teams. I will ask the status to our developer teams and let you know the news.
Any answer?
Yes, the fix has been made for the next release. As I remembered you were using WebGrid6 which I told before that we has discontinued to release any fix or enhancement for this product. I suggested you to upgrade into WebGrid7 for the fix.
This is not about the fix for the slider which is solved in WebGrid 7. My open question is how to achieve my requirements without a crash of WebGrid and without making two database requests. You said you were checking with your developers on how to achieve this. That's what I'm waiting for.
I am sorry but it seems there is missunderstanding between us.Here is the condition:Everytime, I suggested a workaround for your project, it would not work for the next project that you sent me. So, It causes too much effort and I decided to go back into your original project earlier. My expectation, our developer teams can go directly to fix this error in your original project.Unfortunately, the fix is only ready for WebGrid7.WebGrid6 is our very old product (3years) which has been stopped for any bug fixes or enhancements.
Please note that this problem is not related to WebGrid6. You never said the crash is fixed in WebGrid7, only the slider bug is solved in WebGrid7. So I don't expect any bugfixes in WebGrid6. But I don't see any reason to upgrade to WebGid7 if it has the same bugs. And as far as I remember you could even reproduce the bug with WebGrid7.
So we are talking about a crash in WebGrid here. Either you can provide a useful workaround or you should fix the bug. It is true that you suggested one workaround and I provided various samples to demonstrate you that this workaround doesn't work.
You tried to change the whole structure of the events. Maybe because you usually implement it this way. With this structure change, it is now required to have all database data ready where we usually don't have the data yet. We cannot have two database calls just to fill the grid. This not only doesn't work for performance reasons, but also could yield different results if the database changes between the two calls - as I showed you in a sample.
In your last post from February 21 you told me you understand the problem and want to find a way with the developers on how to implement this. Since then I didn't hear any new answer from you. I think we're not doing anything unusual, so it shouldn't be so complicated.
So can you fix this bug or provide a useful workaround or not?
That what I mean about misunderstanding between us. Since everytime my workaround could not cover all your upcoming scenario, I think it would be too much effort to do this. That's why I am back into your first original project which crash error. To save more time, It would be great if our developer teams just directly fix the crash. But this means, the fix would be only in WebGrid7 because as I said before and kept saying, we have discontinued WebGrid6 support. I only can try my best to help you to think if there is another way or not. However, I would try to talk with our developer teams regarding this issue. But I could not promise anything since this is a decision made from our management.
So the crash in the initial sample will get fixed (in WebGrid 7)? Or has to get approved to get fixed by management first? Or how will this go on?
I am very sorry. After further discussion with our management team, the decision is to fix this issue in WebGrid7.
If you will fix it, no matter in what version, then there is no reason to be sorry.
Please update this thread when it is fixed.
Has this been fixed (in WebGrid 7) in the meantime? I didn't see a thread update.
Thanks,Eric
It would be fixed in the next release. Currently, we could not send or release any nighly/official hotfixes because we want to focus in our release which is within this month.
I'm not sure if I understood you correctly. There are several ways to understand your response:
a) The bug is fixed. In the new release is will be included and you will issue a hotfix for WebGrid7 also.
b) The bug is fixed, so it is included in the new release (only). No hotfix for WebGrid7 will ever be issued.
c) You are planning to fix the bug in the new release only. It should probably be included with the new release. There will be no hotfix for WebGRid7.
d) You are planning to fix the bug in the new release only. It should probably be included with the new release. A hotfix for WebGrid 7 will be released afterwards.
e) You are planning to fix the bug after the new release is out. It will be fixed in the new release only.
f) You are planning to fix the bug after the new release is out. It will be fixed by a hotfix in both the new and current (WebGrid7) release.
No matter what you meant, I'll wait a few weeks or so for the new release and ask you then again. Feel free to post an update if you know more earlier.
The issue would be fixed in the next release. We could not release any official/nightly build now because we focus on R1 release.
Yes, I understood that part. But "would be" actually means it "will not" get fixed and you probably did not mean that. So this is not clearer than in your last post. But I'll wait until the next release anyway.
Regards, Eric
Now that 2011 R1 is released, can you give an update on both bugs?
Hello,
Yes after this released, we are focusing in our bug fixes.
Ok, so please let me know when you know when what is fixed - or if it is already.
Any update yet?
Yes, It should be ready in our upcoming SP1. I will keep update this to our developer teams.
So both bugs are resolved in the SP1 release? But SP1 is not out yet, right?
Is there any way to test this without buying an update license?
I think only one issue left in this thread, Error when resize the column. The slider was already fixed in WebGrid 7 latest hotfix/release. The remaining issue in other thread (XML PostBack) would be fixed also in SP1 release.Fyi, You can try the fix by downloading our latest WebUI Studio installer. You can have 30 days trial without a license.
Yes, the slider issue and the resize crash. Both are fixed now in the SP1? When does SP1 get released?
The slider issue has been fixed in WG7 latest hotfixes before relase WebUI2011R1. So, in current release, it has been already fixed. We only need to ensure that the last issue would be fixed in SP1 release.
Ok, slider bug is fixed. What about the crash? Fixed already or not? Will it go into SP1 or not? Is SP1 released already or not? If not, when?
Unfortunately, due to other high priorities and urgent issues, we have to shipped SP1 earlier than expected. As the results, the SP1 doesn't include the particular work items associated to your issues. We will continue to address the rest of work items in the upcoming hotfix based on our work items queues and priorities. Regarding Slider bug issues, this has been fixed in 2011R1. But the crash when resize column issue would not be listed in SP1. It would be in the next hotfixes. Once again we are very sorry. Thank you for understanding this matter.
Ok, please update this thread when the bug is fixed or when you know when it will get fixed.
Our developer has sucessfully found the cause. Unfortunately, In their investigation, this is not a bug. But error in level code.
If wg Is grdUpper Then tbl.Columns.GetNamedItem("Upper_Id").Visible = False tbl.Columns.GetNamedItem("Upper_Parent_Id").Visible = False tbl.Columns.GetNamedItem("A").Visible = Not (ddlSelect.SelectedValue = "PD2") tbl.Columns.GetNamedItem("D").Visible = Not (ddlSelect.SelectedValue = "PD1")
Somehow, "D" column is null. Here I attached modified sample based on your first original sample. Hope this helps.
Hello Handy
There is no error in the code. I know that the column "D" is null. This is the bug. I want that the column "D" no longer randomly disappears. I am changing visiblity and stuff, but the column should always be accessible by servers-side code. The column may disappear on the client-side if it is not visible though, but never on the server-side.
In your new sample you modified the code. I do know that it is possible to write different samples that do work. But it is not the same sample anymore. We could now get into long discussions about requirements etc. but I just want the original sample to not crash anymore - with the unchanged code. (Or show me where I programmed something violating your specification. Point me to the documentation to what I didn't obey in this case.)
We had those requirements discussions already and finally you confirmed that it is a bug. Please read the thread again if you need to recall. I have a (bad) workaround already, but I need this bug fixed. Thanks.
Yes, I understand about our last conversation. But after investigate the issue deeply, our developer teams thinks that the error correctly come from the level code (Column D is null). Also, my latest changes is different from my previous posts.
I looked at your code again. You moved the column creations from .Init to .PrepareDataBinding and added a RootTable.Columns.Clear before the creation. You also moved the footer code from the Page.Load to the grdLower_PrepareDataBinding. But the main change is that in SetColumnVisibility you check if column D exists and if not you just create it.
This can't be your proposed solution, right? If you create the columns and then later when you use them, one column suddenly disappears, you just recreate it? And then you tell me this was a bug in my code and not in your product?
Please fix this bug instead of providing me non-working workarounds.
I have forwarded your feedback to our developer. I will update to you when there is a progress regarding this issue or not.
Here is the reason why it is not said as bug.
When postback, it’s too early because the columns are then overridden with the setting which is sent from the client-side. That’s why Column D is gone.
To address this issue, there is others workaround.
Private Sub InitializeColumns() Const cDataWidth As Integer = 80 AddHiddenGridColumn(grdUpper, "Upper_Id", "Upper_Id") AddHiddenGridColumn(grdUpper, "Upper_Parent_Id", "Upper_Parent_Id") AddGridColumn(grdUpper, "Description", "Description", "Description", cWidthUpperDescription) AddGridColumn(grdUpper, "A", "A", "A", Nothing, Sorting.Yes, Nothing, cColorLeft, HorizontalAlign.Left, cDataWidth) AddGridColumn(grdUpper, "B", "B", "B", Nothing, Sorting.Yes, Nothing, cColorLeft, HorizontalAlign.Left, cDataWidth) AddGridColumn(grdUpper, "C", "C", "C", Nothing, Sorting.Yes, Nothing, cColorLeft, HorizontalAlign.Left, cDataWidth) AddGridColumn(grdUpper, "D", "D", "D", Nothing, Sorting.Yes, Nothing, cColorLeft, HorizontalAlign.Left, cDataWidth) grdUpper.RootTable.DataKeyField = "Upper_Id" grdUpper.RootTable.SelfReferencingSettings.ChildDataMember = "Upper_Parent_Id" grdUpper.RootTable.SelfReferencingSettings.Enabled = True grdUpper.RootTable.SelfReferencingSettings.ParentDataMember = "Upper_Id" grdUpper.RootTable.SelfReferencingSettings.ExpandColumnMember = "Description" grdUpper.RootTable.SelfReferencingSettings.LoadOnDemand = False grdUpper.RootTable.SelfReferencingSettings.ApplyChildSorting = True End Sub Protected Sub grdUpper_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdUpper.Init If (Not IsPostBack) Then InitializeColumns() End If End Sub Protected Sub grdUpper_Load(sender As Object, e As System.EventArgs) Handles grdUpper.Load If IsPostBack Then grdUpper.RootTable.Columns.Clear() InitializeColumns() End If End Sub
Thanks for your feedback. This workaround looks much better. The original sample doesn't crash anymore when doing the same things. I have to test if anything else doesn't work anymore though, which might take some time, but from this change I don't expect any such problems.
So to summarize this in short: In the PreRender event it is forbidden to touch the grd.RootTable columns, or at least it is not reliable to touch them as they can disappear because they internally get overwritten by client content at this stage.
Is this behaviour documented somewhere? If not, please describe this in the PreRender event. Can you also add a link to that description in this thread please?
Thanks, Eric
There is no much detail information about PreRender event. I will try to ask our developer regarding this information. For information, you can see our WebGrid server side sequence life cycle in our documentation (Features and Concepts>>Events>>Event sequence of server side event).
Did you mean this event list?
Occurs after the Control object is loaded but prior to rendering.
Use this event to perform any updates before the server control is rendered to the page. Any changes in the view state of the server control can be saved during this event. Such changes made in the rendering phase will not be saved.
That's not really much information, as you write as well. So yes, please update the documentation (and put it to your homepage too).
Regarding Slider bug issues, this has been fixed in 2011R1.
I just tested with 2012R2 trial and it is not fixed. Can you re-investigate please or tell me when it gets fixed?
It has been fixed before. It seems the issue is back (regression). I need more time to replicate in a simple sample for this issue. Because the previous one that I raised in my old simple sample already worked well. Perhaps, need to cover another case.
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