|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
Hi,
Is there a difference in the postback code of the toolbar control. I have code that works fine with EO.Web.dll 8.0.40.2. I the version 9.0.24.2 is no postback event on the serverside raised.
have you any idees...
Thanks Philipp
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
Hi, I have found the problem. There is an bug with the page validation control. Here is an example page:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="jNetwork.WebAppBase.WebForm1" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:ToolBar ID="tbMain" runat="server" Width="100%" BackgroundImage="00100203" BackgroundImageLeft="00100201"
BackgroundImageRight="00100202" SeparatorImage="00100204" AutoPostBack="True"
OnItemClick="tbMain_ItemClick">
<DownStyle CssText="BORDER-RIGHT: #335ea8 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #335ea8 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 1px; BORDER-LEFT: #335ea8 1px solid; CURSOR: hand; PADDING-TOP: 3px; BORDER-BOTTOM: #335ea8 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #ffe1ac" />
<HoverStyle CssText="BORDER-RIGHT: #335ea8 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #335ea8 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; BORDER-LEFT: #335ea8 1px solid; CURSOR: hand; PADDING-TOP: 2px; BORDER-BOTTOM: #335ea8 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #ffe1ac" />
<Items>
<eo:ToolBarItem Type="Separator">
</eo:ToolBarItem>
</Items>
<ItemTemplates>
<eo:ToolBarItem Type="Custom">
<NormalStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<HoverStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<DownStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
</eo:ToolBarItem>
<eo:ToolBarItem Type="DropDownMenu">
<NormalStyle CssText="background-image:url('00100205');background-position-x:right;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;cursor:hand;padding-bottom:3px;padding-left:4px;padding-right:4px;padding-top:3px;" />
<HoverStyle CssText="background-color:#ffe1ac;background-image:url('00100206');background-position-x:right;border-bottom-color:#335ea8;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#335ea8;border-left-style:solid;border-left-width:1px;border-right-color:#335ea8;border-right-style:solid;border-right-width:1px;border-top-color:#335ea8;border-top-style:solid;border-top-width:1px;cursor:hand;padding-bottom:2px;padding-left:3px;padding-right:3px;padding-top:2px;" />
<DownStyle CssText="BORDER-RIGHT: #335ea8 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #335ea8 1px solid; PADDING-LEFT: 4px; BACKGROUND-POSITION-X: right; BACKGROUND-IMAGE: url(00100206); PADDING-BOTTOM: 1px; BORDER-LEFT: #335ea8 1px solid; CURSOR: hand; PADDING-TOP: 3px; BORDER-BOTTOM: #335ea8 1px solid; BACKGROUND-COLOR: #ffe1ac" />
</eo:ToolBarItem>
</ItemTemplates>
<NormalStyle CssText="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 3px; CURSOR: hand; BORDER-TOP-STYLE: none; PADDING-TOP: 3px; FONT-FAMILY: Tahoma; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" />
</eo:ToolBar>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:TextBox ID="TextBox1" runat="server" ValidationGroup="ValGroup1"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ValidationGroup="ValGroup1" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>
</form>
</body>
</html>
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EO.Web;
namespace jNetwork.WebAppBase
{
public partial class WebForm1 : System.Web.UI.Page
{
/// <summary>
/// Initialisiert die Seite
/// </summary>
/// <param name="sender">sender</param>
/// <param name="e">Parameter</param>
protected void Page_Init(object sender, EventArgs e)
{
tbMain.Items.Clear();
ToolBarItem icon = new ToolBarItem();
icon.ImageUrl = "~/icons/main_add.png";
icon.ToolTip = "Test";
icon.Visible = true;
icon.Disabled = false;
icon.DisabledImageUrl = "";
icon.CommandName = "CommandX";
icon.CommandArgument = "";
icon.GroupName = "icongroup1";
tbMain.Items.Add(icon);
}
protected void tbMain_ItemClick(object sender, ToolBarEventArgs e)
{
Literal1.Text = "Event Fired";
}
protected void Button1_Click(object sender, EventArgs e)
{
}
}
}
The validation of the textbox is inside a validationgroup. The toolbar ignores that.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Thanks for the update. We do not support validation group. The control calls PageValidate() directly. This may be changed in future builds in order to fully support validation groups.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
OK. I dont need the validation in the toolbar. I have set CausesValidation to false now. The value was not set. Have you change the default value from false to true? This works for me.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The old version does not have that property. So it would be the equivalent of "false" in the new version. The new version added this property and by ASP.NET control "tradition", the default value is true.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2007 Posts: 98
|
OK. Thanks
|
|