User Profile & Activity

Eric Member
Page
of 19

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.

Eric

 

 

 

Hi

I have tested your workaround as mentioned in my last post. It doesn't work:

  • 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.
  • Even in this example there is a new problem: When you resize the first column and then resort the grid, the width of the titles don't match the grid widths.
  • The slider still doesn't work.
  • Initialisation code is now in PrepareDataBinding event (that's wrong by definition)
  • Maybe more issues, test stopped.

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?

Regards,

Eric

Hello Handy,

Thanks for your response. Looking at your files, I can see the following changes:

  • formatting and deleted number of rows display in footer
  • You removed the calls to SetColumnCaptions and SetColumnVisibility from PreRender and moved it to PrepareDataBinding event.
  • You removed the code to initialize the columns from Init to PrepareDataBinding event.

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.

Regards,

Eric

Posted: December 22, 2010 6:57 AM

Well, actually the JavaScript code cannot be hidden. But it is scambled in a way so that it's not very readable. I agree that having the source code would help many customers to debug their software, because it's not always clear if it's a problem in your own code or in the product.

It had lots of support calls (or now posts here in the Community) already asking for help. The problem is that the first reply takes at least an entire business day and until a solution or workaround is found it usually takes several weeks. When we would have the source, we could potentially fix the problem ourself, at least until Intersoft releases a fix.

 

Posted: November 2, 2010 4:50 AM

Yes! This is what was missing. Thanks a lot!

Posted: November 1, 2010 9:09 AM

Any updates yet?

Posted: October 29, 2010 12:19 PM

Thanks for your post A Yousif. We are using CSS already as you can see in the sample I attached in my original post, so there is nothing to improve. We cannot show less data - all rows are needed at once. We even need to be able to sort them several times by different columns. So I still like to hear an official statement from Intersoft.

To repeat my final question to Intersoft here:

In short, can you tell me:

  • Isn't IE6 a supported browser of WebGrid 6?
  • Are 3500 rows just too much for a web application / for WebGrid?
  • Is there any big difference with a newer WebGrid version? If yes, what times do you get there with IE6 client?

Please also consult your sales department before answering. Thanks.

Posted: October 22, 2010 10:09 AM

Hi Handy,

I know how the CustomSort works. Thanks for this suggestion anyway. But my problem is that it doesn't sort at all, not even alphabetically.

I'm not sure which sample you mean. I cannot find samples on your homepage. So I went to search on what was installed with your product. There is no installation, but I found a tutorial with some samples. In the folder C:\Program Files\Intersoft Solutions\WebGrid.NET 6.0\Tutorials\WG60TutorialsVB\V5.0 I found a sample called SelectSelfRefChildRow.aspx, which would be the most closest to what I want. But that sample has sorting disabled.

The other three samples there that begin all with Hierarchical_... all have sub-tables with separate titles. This is not what I need.

If you look at my sample here:

http://www.intersoftpt.com/Community/WebGrid/Design-question-How-to-add-OnClick-Handler-on-a-field-in-WebGrid/

and take the MergeButtonSample_v3.zip, and open the file DBCalls.vb and in Sub AddRow add this code:

r("R_a") = Rnd()
r("R_b") = Rnd()
r("V_a") = Rnd()
r("V_b") = Rnd()

just before the If Not ParentBlockId...

Then run the sample and try sorting on any field. You can see that the sort-triangels appear in the header, but nothing gets sorted. This is what I meant.

Does this work with a newer WebGrid or do I have to write code for this? If code, then how?

Thanks,

Eric

 

Hi Handy,

Back from my vacation, I read your response above. Your above code was about the problem why storing the values in the Session object might have failed. Correct?

Actually I'm not using the Session object anymore. As mentioned, I'm storing the expand/collapse status in a form field on the page. Please also see my attached sample, version 3. This is the final, working solution for me.

The only remaining problem, as mentioned in my last post, is why I have to initialize the Session object (line 20 in Default.aspx.vb). I assume a bug in WebGrid. Can you check that?

Regards,

Eric

Hi Handy,

Ok, after working on this for weeks now, I found the final solution. Manually caching the expand/collapse status now works.

What I have done:

  • In ClientSideEvents I defined handlers for OnSelfRefRowExpand and OnSelfRefCollapse
  • added a hidden form field to store the expand/collapse status
  • In these JavaScript handlers get grid.GetSelectedObject().GetRowObject() to access the row and wgGetCellByName(row.GetElement(),'colname'); to get the cell, and cell.ID to access the CustomAttributes, which store the row-ID. For expand, add the ID into the hidden field, for collapse remove it from there (comma separated string with IDs).
  • In grid's InitializeRow event handler, read this hidden form field and if the current row's ID is contained in the stored form field value, then call e.Row.ExpandSelfRefRow(True) to restore the expand status.
Ok, so this solved the remaining problem with storing the expand/collaps status.

What you could do is to check why the Session object has to get initialized before WebGrid is usable. (My first post with the first sample.)

Thanks,
Eric

All times are GMT -5. The time now is 11:31 PM.
Previous Next