Welcome Guest Search | Active Topics | Sign In | Register

Grid with different FixedTopItemHeight and ItemHeight Options
Ronald
Posted: Wednesday, December 18, 2013 10:04:48 AM
Rank: Member
Groups: Member

Joined: 8/21/2008
Posts: 24
Dear Support,

I think, I detected a bug in the Grid using a different height for “FixedTopItemHeight” and “ItemHeight”.
Please have a look at the following source-codes:

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication1.WebForm3" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!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="GridTimechart" runat="server" BorderColor="#828790" BorderWidth="1px" 
                    ColumnHeaderAscImage="00050204" ColumnHeaderDescImage="00050205" 
                    ColumnHeaderDividerImage="00050203" FixedTopItemCount="1" FixedTopItemHeight="60" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" 
                    Font-Overline="False" Font-Size="10pt" Font-Strikeout="False" 
                    Font-Underline="False" GridLineColor="240, 240, 240" GridLines="Both" 
                    Height="290px" Width="980px" ForeColor="Navy" ColumnHeaderVisible="False" ItemHeight="18" ClientSideOnItemSelected="SelectTimechartDate">
            <FixedTopItemStyle CssText="background-color:dimgrey;padding-left:0px;padding-top:0px" />
            <FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
            <ItemStyles>
                <eo:GridItemStyleSet>
                    <ItemStyle CssText="background-color: white;font-family: 'Arial Narrow';font-size: 10pt;white-space: nowrap;" />
                    <ItemHoverStyle CssText="background-color:yellow; font-family: 'Arial Narrow'; font-size: 10pt; white-space: nowrap;" />
                    <SelectedStyle CssText="background-color:yellow; font-family: 'Arial Narrow'; font-size: 10pt; white-space: nowrap;" />
                    <FixedColumnCellStyle CssText="font-family: 'Arial Narrow'" />
                    <CellStyle CssText="padding-left: 0px; padding-top: 2px; white-space: nowrap;" />
                </eo:GridItemStyleSet>
            </ItemStyles>
            <ColumnHeaderStyle CssText="background-color:dimgrey;padding-left:0px;padding-top:0px" />
            <ColumnHeaderHoverStyle CssText="background-color:dimgrey;padding-left:0px;padding-top:0px" />
            <Columns>
                <eo:StaticColumn HeaderText="Tag" Width="20" AllowResize="False" Name="Weekday">
                </eo:StaticColumn>
                <eo:StaticColumn HeaderText="" Width="35" AllowResize="False">
                </eo:StaticColumn>
                <eo:StaticColumn HeaderText="Zeit" Width="38" AllowResize="False" Name="TimeProfile">
                </eo:StaticColumn>
                <eo:StaticColumn HeaderText="Soll" Width="35" AllowResize="False" Name="DebitTime">
                </eo:StaticColumn>
                <eo:StaticColumn HeaderText="Buch." Width="62" AllowResize="False" Name="Booking">
                </eo:StaticColumn>
                <eo:StaticColumn Width="62" AllowResize="False">
                </eo:StaticColumn>
                <eo:StaticColumn Width="62" AllowResize="False">
                </eo:StaticColumn>
                <eo:StaticColumn Width="62" AllowResize="False">
                </eo:StaticColumn>
            </Columns>
        </eo:Grid>
    </div>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    </form>
</body>
</html>


And:

Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GridTimechart.DataSource = new Object[50];
                GridTimechart.DataBind();

                for (int i = 0; i < GridTimechart.Items.Count; i++)
                {
                    GridTimechart.Items[i].Cells[0].Value = i.ToString();
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            int row = GridTimechart.SelectedItemIndex;

            GridTimechart.Items[row].Cells[1].Value = "x";
        }
    }
}


If you select a line, which is not visible without scrolling down and press the button, the selected row will not be visible after the refresh, just the line above.
If you change the “FixedTopItemHeight=18” everything is OK. If you change “FixedTopItemHeight=60” there are more than 2 rows missing. I think, you did not take into account a different “FixedTopItemHeight”

Thank you for your help!
eo_support
Posted: Wednesday, December 18, 2013 3:27:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Thanks for the test code. We have confirmed this to be a bug. We will fix it and we should be able to provide an update build in a few days.
eo_support
Posted: Monday, December 23, 2013 11:36:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We have posted a new build that should fix this problem. You can download the new build from our download page.

Thanks!
Ronald
Posted: Saturday, December 28, 2013 5:52:45 AM
Rank: Member
Groups: Member

Joined: 8/21/2008
Posts: 24
Thank you very much!
Everything is fine now!
eo_support
Posted: Saturday, December 28, 2013 9:18:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
You are welcome. Please feel free to let us know if there is anything else!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.