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!