I have several pages where I use the WebGrid placed inside either a AJAX Updatepanel or a Web Async Refresh Panel. But after a refresh (inserting new rows, removing rows, etc.) the WebGrid looses its styleformat.
EnableViewState is set to true on the page, updatepanels and webgrid..
Is this a known problem?
I've seen this before, if you're stying WebGrid using its Style properties.
If I understand correctly, the reason for this is because WebGrid emits dynamic CSS to the page when you set its Style properties, to account for the appearance. This dynamic CSS isn't handled by either the UpdatePanel or the WARP, nor do I know of a way to make either panel do so. The result is that the appearance of the grid is partially or completely lost during the panel's asynchronous callback.
The best solution I know of is to use CSS to style WebGrid, rather than its Style properties. You can have the CSS classes defined either in a page or in a separate file, so long as those CSS classes are availalbe to the browser when the page initially renders. WebGrid will then simply pass references to those CSS classes in the appropriate locations, and will find the corresponding classes on the browser.
We're using CSS to style the WebGrid. This "error" came with the 8.1 version of the components. I guess. At least that's when I first experienced it..
That's exceptionally odd.
Can you reproduce this in an isolated sample, using CSS classes? If so, then please submit a support request so that we can investigate this in more detail. I'm inclined to think that this may be a bug, but there's no way to tell without digging to find out why it's occurring.
Hi Vince,
I have the same issue. Below is how I am using webgrid. Please let me know 'style disappearance' is expected behaviour with the way I am using or it'a a known issue with 8.1?Thank you.
<div class="igtbl_Office2007BlueEnclosure"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnSearchFilter" /> </Triggers> <ContentTemplate> <igtbl:UltraWebGrid ID="dbgTimeClockApproval" runat="server" Width="100%" OnClickCellButton="dbgTimeClockApproval_ClickCellButton" DataKeyField="WorkDayId" OnPageIndexChanged="dbgTimeClockApproval_PageIndexChanged" OnInitializeRow="dbgTimeClockApproval_InitializeRow" OnSortColumn="dbgTimeClockApproval_SortColumn">
Karan,
We would need more information to be able to determine if the issue you've described is the same as was mentioned earlier in this thread. Other than the "class" attribute set on the DIV element, I don't see how you're stying anything inside the UpdatePanel.
Can you reproduce this in an isolated sample? If so, then please submit a support request so that we can investigate this in more detail.