Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
Two UltraWebGrid, custom column and app style problem
posted

Hi all,

I have a page with 2 UltraWebGrids. The web site uses an IG predefined style set.

Apparently when the 1st grid has a custom template column defined, the data rows in the 2nd grid receive css header classes and are displayed as if they were grid header rows. I'm uncertain why one grid affects the other, and why having a custom column in one grid causes this behavior in the another grid.

The workaround I had to use was to place a template column in the 2nd grid too, with Width="0". Note the following picture which shows the bug on the left and the workaround on the right. Note that "My Column" is the custom column of the 1st grid (top grid), and the Filename is an autogenerated column of the 2nd grid (bottom grid).

Here's the code. If I uncomment the template column in the 2nd grid, the problem is "worked around":

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server">
    </asp:ScriptManager>
    <ig:UltraWebGrid runat="server" ID="grid">
        <DisplayLayout AutoGenerateColumns="false">
        </DisplayLayout>
        <Bands>
            <ig:UltraGridBand>
                <Columns>
                    <ig:TemplatedColumn>
                        <Header Caption="My Column">
                        </Header>
                        <CellTemplate>
                        </CellTemplate>
                    </ig:TemplatedColumn>
                </Columns>
            </ig:UltraGridBand>
        </Bands>
    </ig:UltraWebGrid>
    <br />
    <ig:UltraWebGrid runat="server" ID="results">
        <DisplayLayout AutoGenerateColumns="true">
        </DisplayLayout>
        <%--<Bands>
            <ig:UltraGridBand>
                <Columns>
                    <ig:TemplatedColumn Width="0">
                        <Header Caption="&nbsp;" />
                    </ig:TemplatedColumn>
                </Columns>
            </ig:UltraGridBand>
        </Bands>--%>
    </ig:UltraWebGrid>
    </form>
</body>
</html>

Parents
No Data
Reply
  • 325
    posted

    Hi.  I am having the same problem with you, and your work around worked, except that my 2nd grid has a child band and the cells in this child band are still  not working properly.  (Style sheet is not applied to them at all).  I added a fake template column to the chind band like I did to the parent band, but it did not work.  (I hoped it would...)  I am wondering if you or Infragistics support know how to handle this issue.

Children