User Profile & Activity

A Yousif Member
Page
of 29
Posted: February 18, 2010 8:32 AM

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.

Posted: February 17, 2010 2:41 PM

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.

Posted: February 16, 2010 8:16 AM

Hi Julia,

We can really use this feature.  It's critical to us that we're able to use a custom check box as a row checker.  I'm just a developer and am not the one who makes the final design decisions and I know that the standard default row checker is unacceptable due to it conflicting with the rest of the UI look of our application.

However, I do have the initial solution working, although it's a pain because I have to repost the page, i.e., do a page refresh under certain circumstances, but we're doing that anyway since operations like ungrouping and adding columns updates the structure and right now there's no way to update it dynamically.  I submitted a feature request for that too months ago through Handy.  I hope that will be available some time soon?

Yes, I have no issues with sorting, moving columns, resizing columns and refresh data.  I've provided details as I moved along this solution.  I didn't know this information at the beginning when I posted the original question.  At that point, I just knew we needed a custom row checker.  I didn't know about any of the issues that cropped up later.  Thanks Julia.

Posted: February 15, 2010 8:21 AM

You duplicated the problem just fine in your video.  Did you not notice the row checker column disappeared when you GROUPED?  I'm talking about the headers, which is the context of this thread, and NOT the rows.

Also, when I say post backs, I'm referring to the fly post backs by the grid during its own operations, like sort, refresh, group, etc., and not page post backs from external objects like buttons.  The problem seems to only happen when the grid is grouped.

[EDIT] I forgot that this also happens when you remove a column.  You can easily see this when you select "Remove This Column" from the header context menu.  You'll have to enable this in your sample.

Posted: February 12, 2010 9:01 AM

Here I attached my simple sample on how to add the checkbox to WebGrid's header. I hope this sample could help.

 There's an issue with this approach, even though it's the only one I can think of too, in that any post backs for sorting or grouping of columns will cause the check box to disappear.

In our environment, the grid is a custom control and there may be more than one grid on a page, so the row checker check box must be created dynamically from within the grid.  This is fine, however, I'm trying to solve the problem on post backs when the grid re-renders itself, it seems to ignore any javascript that attempts to reinsert the check box.

The check box is in the header yet it does not show when the grid is rendered on post back.  We've gotten around issues with post backs, like those when we update our grid structure, by forcing a page reload.  I'd like to avoid doing a page reload if I can solve this by having the grid correctly render the check box.  Do you have some ideas, or can you update your sample so it shows the check box when you sort and group columns please?  Thanks.

I went in to the dev net anyway just because I was curious and when you try to create a new feature request post, you get the standard message throughout the dev net that says to use the public forums and the dev net will be discontinued.

I'd still recommend you guys create a subsection here for feature requests.  I'm sure we're not the only ones using the licensing model that, pretty much ties our hands, by only allowing us to use one login so different developers working on different tasks just can't use it.

Thanks for submitting this.  It's really a critical feature for us and we can really use it as fast as you guys can make it available please.  Thank you.

Ah, I missed the "client binding" caviat.  Shoot.  Thanks for the clarification.

It's not feasible for us to go through the developer network because we don't have developer logins.  I've tried to work with you on getting these but to no avail.  We can't have the person whose email is on the account inundated with technical development emails.

I'd highly recommend a subsection for each forum specifically for feature requests to make it easy for us to submit them and for you to organize them.  Thank you.

Oh, one more thing, the developer network forums were discontinued in September of 2009, so I'm not sure why you would point me or anyone else in that direction.

Posted: February 9, 2010 8:39 AM

I was about to reply that I found it and your demo verified how I was going to do this.  Thank you.

 

@InterSoft,

Would like to see an ITemplate implementation for the row checker so we can add our own checker to the column header.  Getting around this by inserting controls via javascript is not an elegant solution and can easily break if the object collections change.

Wow, it's hard to believe the grid doesn't do this.  Yes, please, submit it as a feature request.  This is a critical feature for our company, so if you can please add it sooner than later.

All times are GMT -5. The time now is 7:46 PM.
Previous Next