I anticipate that I have over looked the obvious, but this one has me stumped. The scenario is this:
Any Help Greatly Appreciated.
Neil
Two questions:
Are you using a WebAsyncRefreshPanel or an UpdatePanel on your page? If so, these may be causing your styles defined in InitializeLayout to be lost. You may want to style your grids using CSS instead, if this is the case.
How are you passing the information from the parent grid to the child grid? This may simply be an order-of-events issue, depending on what you're doing and when.
Was there a final resolution to this? I'm attempting the same thing, with two grids as master-detail, except I want the detail grid to refresh/display only after a button is clicked.
My selected key label is visible not hidden, and currently set by client-side script from master grid.
If the button and the detail grid are in a WebAsyncRefreshPanel, the requery takes place (I can tell from the amount of network traffic in relation to the master that was selected) but the detail grid becomes invisible, perhaps losing its styling as you mentioned. If I don't click the button, but use ajax features on the detail grid (e.g. click on a column heading to sort) this triggers the query and displays the results.
I want to implement this without a full-page refresh. Perhaps there's an easy way client-side to ask the detail grid to request a refresh of its data, without placing it in a WARP? Or a way to re-trigger InitializeLayout styling so the grid doesn't vanish?
PV87669,
Since you're using WARP, your issue isn't the same as the one mentioned above.
When using WARP (or UpdatePanel), any items normally rendered to the HEAD section of the page are not included on an async callback. This includes any style information that our controls dynamically create. The solution is to style your controls (both ours and others) using CSS classes that are available to the page with all responses, inculding the initial response. You can likely find more details about this on other posts in these forums.
Thanks for the comments Vince.
a) I think my issue could be "the same" if I could figure out how to achieve the effect without use of an UpdatePanel, WARP, or full postback. Is there any way to trigger a grid to refresh/requery from client-side scripting? Clicking on a column heading to sort it does the trick, but I want to do it from a separate control.
b) Re: using a WARP, I searched the forum for a while. The first thing I found was other people asking the same thing, and just being told "use CSS". I also found "there are 4 ways to [use app styling]" and similar, none of which solved the problem. Can you give a bit more of a hint on where to look, or how to style the grid without relying on anything that's delivered in the <head>? Does it take a lot of CSS or can it still be just a single reference for the control?
Thanks
PV87669 said:there any way to trigger a grid to refresh/requery from client-side scripting? Clicking on a column heading to sort it does the trick, but I want to do it from a separate control.
PV87669 said:Can you give a bit more of a hint on where to look, or how to style the grid without relying on anything that's delivered in the <head>? Does it take a lot of CSS or can it still be just a single reference for the control?
The following article from our online help documentation provides an example of styling WebGrid using CSS:HOWTO: Style the grid using Cascading Style Sheet (CSS) classes
If you're writing your own CSS, you'll need to write a separate CSS class for each distinct entity you want to style. These can all be stored in a single .css file, which provides a "single reference for the control" once it's finished.
I'm getting the hang of various postbacks and async behaviors, but still not getting very far with styling.
The HOWTO linked above describes styling an UltraWebDataGrid via CSS, as does the sample code attached to that page. Oddly enough, I didn't have this problem with UltraWebDataGrids, but do with WebDataGrid, and it has completely different configuration for styling (and almost everything).
The CssClass attribute presents a dropdown list of visible styles in Design view. Setting to a custom-defined style is accepted but doesn't seem to achieve much. Setting to one of the ig_ or igg_ styles listed is permitted but then generates a warning in the error list.
Maybe I need to take it back out of the WARP and find another way to refresh grid data without refreshing the whole page.
PV87669 said:Oddly enough, I didn't have this problem with UltraWebDataGrids, but do with WebDataGrid, and it has completely different configuration for styling (and almost everything).
If you're using WebDataGrid, I have two pieces of advice.
First, you'll have an easier time styling WebDataGrid using our Application Styling Framework. This control was built from the ground up with application styling in mind.
Second, replace WARP with UpdatePanel if you're placing a WebDataGrid inside. WebDataGrid uses Microsoft's ASP.NET AJAX Extensions, while WARP uses our CallbackManager; these two different AJAX architectures cannot be used one-inside-the-other.
That makes sense. Perhaps it'd be worth a couple of sections in the doco on "choosing a grid control" and "WARP vs UpdatePanel". I see someone else has just posted a question on this.
Thanks again.