PDA

View Full Version : [CLOSED] Wrong Fill Background -color in Group Columns



Mario
Feb 09, 2015, 10:53 AM
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:
http://forums.ext.net/attachment.php?attachmentid=20621&stc=1

Solutions?

Daniil
Feb 10, 2015, 7:19 PM
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>

Mario
Feb 11, 2015, 6:09 AM
Hmmmm

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

Anyway thanks Daniil.

Daniil
Feb 11, 2015, 6:12 AM
Any details are welcome.