[CLOSED] Wrong Fill Background -color in Group Columns

  1. #1

    [CLOSED] Wrong Fill Background -color in Group Columns

    Hi,

    the code:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
         {
             this.Store1.DataSource = new Object[] 
             { 
                new Object[] {"One A", "One B", "One C"},
                new Object[] {"Two A", "Two B", "Two C"}
             };
    
            this.Store1.DataBind();
        }
    </script>
    
    <html>
    <head runat="server">
        <title></title>
        
        <style>
            
        </style>
    
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server"/>        
            
            <ext:GridPanel ID="GridPanel1" runat="server" Frame="true" Title="Sample" Width="800" Height="450">
                <Store>
                    <ext:Store ID="Store1" runat="server" GroupField="Name">
                        <Sorters>
                            <ext:DataSorter Property="Due" Direction="ASC" />
                        </Sorters>
                        <Model>
                            <ext:Model runat="server" IDProperty="TaskID">
                                <Fields>
                                    <ext:ModelField Name="Col0" Type="String" />
                                    <ext:ModelField Name="Col1" Type="String" />
                                    <ext:ModelField Name="Col2" Type="String" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Width="180" Text="Col 0" DataIndex="Col0" />
    
                        <ext:Column runat="server" Text="Group" StyleSpec="background: #0000ff">
                            <Columns>
                                <ext:Column runat="server" Width="100" Text="Col 1" DataIndex="Col1" StyleSpec="background: #ff0000" />
                                <ext:Column runat="server" Width="100" Text="Col 2<br/>Col 2<br />Col 2" DataIndex="Col2" StyleSpec="background: #ff0000"/>
                            </Columns>
                        </ext:Column>                    
                    </Columns>                
                </ColumnModel>           
            </ext:GridPanel>
        </form>
      </body>
    </html>
    In second grouped column the cell not fill correctly.
    It's possible see a line of Group Mastes column color (Blue).

    It's appears only in columns with multi line text in header.

    Here an example:


    Solutions?
    Attached Thumbnails Line.png  
    Last edited by Daniil; Feb 17, 2015 at 11:40 AM. Reason: [CLOSED]
  2. #2
    Hi Mario,

    I can suggest this solution.

    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Store1.DataSource = new Object[] 
             { 
                new Object[] {"One A", "One B", "One C"},
                new Object[] {"Two A", "Two B", "Two C"}
             };
        }
    </script>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .my-group-column .x-column-header-inner {
                background-color: #0000ff;
            }
    
            .my-child-column .x-column-header-inner {
                 background-color: #ff0000;
            }
        </style>
    
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:GridPanel runat="server" Title="Sample">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="Col0" Type="String" />
                                    <ext:ModelField Name="Col1" Type="String" />
                                    <ext:ModelField Name="Col2" Type="String" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column 
                            runat="server" 
                            Width="180" 
                            Text="Col 0" 
                            DataIndex="Col0" />
    
                        <ext:Column runat="server" Text="Group" Cls="my-group-column">
                            <Columns>
                                <ext:Column 
                                    runat="server" 
                                    Text="Col 1" 
                                    DataIndex="Col1" 
                                    Cls="my-child-column" />
    
                                <ext:Column 
                                    runat="server" 
                                    Text="Col 2<br/>Col 2<br />Col 2" 
                                    DataIndex="Col2" 
                                    Cls="my-child-column" />
                            </Columns>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  3. #3
    Hmmmm

    The solution partially corrects the problem but does not solve it.
    Maybe it's a bug of Ext.JS...

    Anyway thanks Daniil.
  4. #4
    Any details are welcome.

Similar Threads

  1. [CLOSED] Change Color Window's Header Background Color
    By rguardado in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 16, 2015, 3:48 PM
  2. Replies: 8
    Last Post: May 22, 2014, 1:12 PM
  3. [CLOSED] Gridpanel - group header - Dyamically change background color
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Jul 24, 2013, 12:37 PM
  4. [CLOSED] Change TreePanel background color and toolbar color
    By jchau in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 07, 2012, 4:42 PM
  5. Change Tab background color or background image
    By georgelanes in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 3:55 PM

Tags for this Thread

Posting Permissions