Rank: Member Groups: Member
Joined: 8/21/2008 Posts: 24
|
Hi! I discovered some troubles in the Grid, if I try to use fixed rows at the header instead of a normal header row. If I view the page with the source below, I discovered: 1.) There is an empty header row displayed. 2.) The fixed rows hide the first data row I isolated this inside your "Grid" - "Feature" - "Fixed Items" example. I use your example and change the aspx file to the following:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridTest.aspx.cs" Inherits="Workflow.GridTest" %>
<%@ Register TagPrefix="eo" NameSpace="EO.Web" Assembly="EO.Web" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:Grid id="Grid1" Width="450px" Height="200px" runat="server" BorderWidth="1px" Font-Size="8.75pt"
Font-Names="Tahoma" ColumnHeaderDividerImage="00050103" GridLineColor="220, 223, 228"
BorderColor="#7F9DB9" GridLines="Both" GoToBoxVisible="True" ColumnHeaderAscImage="00050104"
ColumnHeaderDescImage="00050105" FixedTopItemCount="3" FixedBottomItemCount="2" ColumnHeaderVisible="false">
<ContentPaneStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;"></ContentPaneStyle>
<FixedBottomItemStyle CssText="background-color:#f0f0f0;"></FixedBottomItemStyle>
<Columns>
<eo:StaticColumn Width="200" StyleField="ItemStyle" HeaderText="Item" DataField="ItemName"></eo:StaticColumn>
<eo:StaticColumn StyleField="AmountStyle" HeaderText="Amount" DataField="Amount"></eo:StaticColumn>
</Columns>
<FixedTopItemStyle CssText="background-image:url('00050207');padding-left:0px;padding-top:4px;background-repeat: repeat-x" />
<FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
<ColumnHeaderStyle CssText="background-image:url('00050201');padding-left:0px;padding-top:4px;" />
<ItemStyles>
<eo:GridItemStyleSet>
<ItemStyle CssText="background-color:white;font-family:Arial;font-size:10pt;white-space:nowrap;" />
<ItemHoverStyle CssText="background-image:url(00050206);background-repeat:repeat-x;font-family:Arial;font-size:10pt;white-space:nowrap;" />
<SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" />
<CellStyle CssText="padding-left:8px;padding-top:0px;white-space:nowrap;" />
</eo:GridItemStyleSet>
</ItemStyles>
</eo:Grid>
</div>
</form>
</body>
</html>
Thank you very much for your help!
|
Rank: Member Groups: Member
Joined: 8/21/2008 Posts: 24
|
OK, I found it. I have to set:
explicit on my Grid. Probably you can set it internally, if
Code: HTML/ASPX
ColumnHeaderVisible="False"
? Additional one more question: Is it possible, that a value > 2 for ColSpan for a cell of a Grid is not allowed / possible? Again I use your example "Demos" - "Grid" - "Features" - "Column Span" and change the source line:
Code: C#
Grid1.Items[2].Cells[1].ColSpan = 2;
to
Code: C#
Grid1.Items[2].Cells[0].ColSpan = 3;
Now the first two columns are spanned, only!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Thanks for the detailed information. We have posted a new build that should fix both problems for you. Please see your private message for the download location.
Thanks!
|
Rank: Member Groups: Member
Joined: 8/21/2008 Posts: 24
|
Thank you very much for the update! But unfortunately it works on the first appearance, only. Please have a look at the following sources:
Code: HTML/ASPX
<eo:Grid id="Grid1" Width="900px" Height="200px" runat="server" BorderWidth="1px" Font-Size="8.75pt"
Font-Names="Tahoma" ColumnHeaderDividerImage="00050103" GridLineColor="220, 223, 228"
BorderColor="#7F9DB9" GridLines="Both" GoToBoxVisible="True" ColumnHeaderAscImage="00050104"
ColumnHeaderDescImage="00050105" FixedTopItemCount="3" FixedBottomItemCount="2" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False">
<ContentPaneStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;"></ContentPaneStyle>
<FixedBottomItemStyle CssText="background-color:#f0f0f0;"></FixedBottomItemStyle>
<Columns>
<eo:StaticColumn Width="200" StyleField="ItemStyle" HeaderText="Item" DataField="ItemName"></eo:StaticColumn>
<eo:StaticColumn Width="50" HeaderText="Qty" DataField="Qty"></eo:StaticColumn>
<eo:StaticColumn StyleField="AmountStyle" HeaderText="Amount" DataField="Amount"></eo:StaticColumn>
<eo:StaticColumn HeaderText="One"></eo:StaticColumn>
<eo:StaticColumn HeaderText="Two"></eo:StaticColumn>
<eo:StaticColumn HeaderText="Three"></eo:StaticColumn>
<eo:StaticColumn HeaderText="Four"></eo:StaticColumn>
<eo:StaticColumn HeaderText="Five"></eo:StaticColumn>
<eo:StaticColumn></eo:StaticColumn>
</Columns>
<GoToBoxStyle CssText="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 40px; BORDER-BOTTOM: #7f9db9 1px solid"></GoToBoxStyle>
<ColumnHeaderStyle CssText="background-image:url('00050101');padding-left:8px;padding-top:3px;"></ColumnHeaderStyle>
<FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;"></FooterStyle>
<ItemStyles>
<eo:GridItemStyleSet>
<CellStyle CssText="padding-left:8px;padding-top:2px;"></CellStyle>
<FixedColumnCellStyle CssText="border-right: #d6d2c2 1px solid; padding-right: 10px; border-top: #faf9f4 1px solid; border-left: #faf9f4 1px solid; border-bottom: #d6d2c2 1px solid; background-color: #ebeadb; text-align: right"></FixedColumnCellStyle>
</eo:GridItemStyleSet>
</ItemStyles>
<FixedTopItemStyle CssText="background-color:#f0f0f0;"></FixedTopItemStyle>
</eo:Grid>
and
Code: C#
protected void Page_Load(object sender, EventArgs e)
{
DataTable table = new DataTable();
table.Columns.Add("ItemName", typeof(string));
table.Columns.Add("ItemStyle", typeof(string));
table.Columns.Add("Qty", typeof(string));
table.Columns.Add("Amount", typeof(string));
table.Columns.Add("AmountStyle", typeof(string));
table.Columns.Add("One", typeof(string));
table.Columns.Add("Two", typeof(string));
table.Columns.Add("Three", typeof(string));
table.Columns.Add("Four", typeof(string));
table.Columns.Add("Five", typeof(string));
table.Rows.Add(new object[] { "Inspiron Mino 9", "grid_bold_text", "1", "$374.00", "grid_bold_text", null, null, null, null });
table.Rows.Add(new object[] { "Genuine Windows XP Home Edition", null, "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "Accessories", null, null, "", null, null, null, null, null });
table.Rows.Add(new object[] { "1GB DDR2 Memory", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "8.9 inch LED display", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "Intel 950 Graphics Card", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "16G Solid State Drive", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "Wireless 802.11g Mini Card", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "Integrated 0.3M Pixel Webcam", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "32Whr Battery", "indent1", "1", "included", null, null, null, null, null });
table.Rows.Add(new object[] { "Logitech V220 Cordless Mouse", "indent1", "1", "$24.00", null, null, null, null, null });
table.Rows.Add(new object[] { "Creative Labs EP-610 Headphones", "indent1", "1", "$25.00", null, null, null, null, null });
table.Rows.Add(new object[] { "Additional 4 Cell Battery", "indent1", "1", "$100.00", null, null, null, null, null });
table.Rows.Add(new object[] { "Discount", null, null, "-$50.00", "grid_red_text", null, null, null, null });
table.Rows.Add(new object[] { "Total", "grid_bold_text", null, "$473.00", "grid_bold_text", null, null, null, null });
Grid1.DataSource = table;
Grid1.DataBind();
// Grid1.Items[2].Cells[0].ColSpan = 3;
Grid1.Items[2].Cells[4].ColSpan = 4;
}
Now the columns "two" - "three" - "four" - "five" are spanned correctly. But if I remove the comment on line
Code: C#
Grid1.Items[2].Cells[0].ColSpan = 3;
Sometimes "Item" - "Qty" and "two" - "three" - "four" - "five" are spanned. Sometimes "Item" - "Qty" - "Amount" and "two" - "three" are spanned. (It is possible, to switch between, by reloading the page.) But I never receive the result, I like to have: "Item" - "Qty" - "Amount" and "two" - "three" - "four" - "five". Thank you for your help!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted another build that should fix this scenario (having more than one spans in one row). Please see your private message for the download location.
Thanks!
|