Hi,
I am using Ultrawebgrid inside WARP, but during any postback or even when the hyperlink column is clicked, it looses its layout style.
Code is given below.
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="100%" Width="100%"> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"> <Bands> <igtbl:UltraGridBand> <AddNewRow View="NotSet" Visible="NotSet"> </AddNewRow> <Columns> <igtbl:TemplatedColumn BaseColumnName="spec_id" Key="spec_id"> <CellTemplate> <asp:LinkButton ID="lnk" runat="server" Text="View" CommandArgument="<%# Container.Text %>" onclick="lnk_Click"></asp:LinkButton> </CellTemplate> </igtbl:TemplatedColumn> </Columns> </igtbl:UltraGridBand> </Bands> <DisplayLayout Name="UltraWebGrid1" RowHeightDefault="20px" RowSelectorsDefault="No" Version="4.00" SelectTypeRowDefault="Single"> <FrameStyle BorderColor="#999999" BorderStyle="Double" BorderWidth="3px" Cursor="Default"> </FrameStyle> <RowAlternateStyleDefault BackColor="Khaki"> <BorderDetails ColorLeft="Khaki" ColorTop="Khaki" /> </RowAlternateStyleDefault> <HeaderStyleDefault BackColor="#D4950D" BorderColor="Khaki" BorderStyle="Solid" ForeColor="Khaki"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </HeaderStyleDefault> <RowStyleDefault BackColor="White" BorderColor="#D4950D" BorderStyle="Solid" BorderWidth="1px" ForeColor="#D4950D"> <Padding Left="3px" /> <BorderDetails ColorLeft="White" ColorTop="White" /> </RowStyleDefault> <SelectedRowStyleDefault BackColor="#F0CE86" ForeColor="White"> </SelectedRowStyleDefault> <ActivationObject BorderColor="Black" BorderWidth="" BorderStyle="Dotted"> </ActivationObject> <FilterOptionsDefault> <FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px" Width="200px"> <Padding Left="2px" /> </FilterDropDownStyle> <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White"> </FilterHighlightRowStyle> <FilterOperandDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px"> <Padding Left="2px" /> </FilterOperandDropDownStyle> </FilterOptionsDefault> </DisplayLayout> </igtbl:UltraWebGrid> </igmisc:WebAsyncRefreshPanel>
I suspect this behavior is related to what's described in the following post:https://es.infragistics.com/community/forums/f/ultimate-ui-for-asp-net/57934/async-show-hide-webdatagrid#57934
As a possible solution, instead of defining the appeareance of your grid (or any other control in WARP) using its various Style properties, define CSS classes (either inline in the head of your page or in a separate CSS file) and connect them to your grid using the CssClass property under these various Style properties. This will ensure that your browser has all of the styles defined that it might need, when the page is initially rendered, and thus has them already available when the async callback completes.
thanks Vince.
Any way to take the stylesheets defined in the appstylist and convert them to css classes for inclusion?
For the ultragrid, what style sheets form appstylist does it use?
I have a similar problem, in my case I am using Web Parts and I have to define this property by code
_grid.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes;
After the postback it loses this property and set it to the default and this make my grid not editable.
Roberto12cr,
This looks like an entirely separate issue, since the ability to allow updating isn't at all related to a grid's styling. This could be caused by a number of things: JavaScript errors, the property being accidentally overwritten, or possible bugs.
I suggest that you submit a support request so that a Developer Support Engineer can look into your issue further. I suggest you include a sample project that we can run and debug and which reproduces this behavior, so that we can be sure we're using the same code that you are. My suspicion is that you won't need to use web parts to reproduce this; please try to create your sample without web parts first, since using them adds another layer of complexity that will extend the time we'll need to identify what's going on. Of course, if you can't reproduce the issue without using web parts, please use them in your sample.