|
Rank: Newbie Groups: Member
Joined: 5/8/2012 Posts: 4
|
Hi, I have created a Toolbar with custom control items (DropDownList, TextBox) in it. When started to test it in all major browsers FireFox and Opera started to dislike the customised Toolbar. Issues with browsers Opera v11.64:
1) the custom ToolbarItem with a DropDownList is not clickable, items can't be selected from the list 2) TextBox is also not clickable, behave like it is disabled FireFox v12.0:
1) same problem as Opera's issue number 2) - the TextBox is not clickable, editable The code is very simple:
Code: HTML/ASPX
<eo:ToolBar ID="ToolBar2" runat="server" Width="300px" AutoPostBack="true"
BackgroundImageLeft="00100201" SeparatorImage="00100204" BackgroundImage="00100203" BackgroundImageRight="00100202">
<DownStyle CssClass="ToolbarDownStyle"></DownStyle>
<HoverStyle CssClass="ToolbarHoverStyle"></HoverStyle>
<NormalStyle CssClass="ToolbarNormalStyle"></NormalStyle>
<ItemTemplates>
<eo:ToolBarItem Type="Custom">
<HoverStyle CssClass="CustomToolbarItemHoverStyle"></HoverStyle>
<DownStyle CssClass="CustomToolbarItemDownStyle"></DownStyle>
<NormalStyle CssClass="CustomToolbarItemNormalStyle"></NormalStyle>
</eo:ToolBarItem>
<eo:ToolBarItem Type="DropDownMenu">
<HoverStyle CssClass="DropDownMenuHoverStyle"></HoverStyle>
<DownStyle CssClass="DropDownMenuDownStyle"></DownStyle>
<NormalStyle CssClass="DropDownMenuNormalStyle"></NormalStyle>
</eo:ToolBarItem>
</ItemTemplates>
</eo:ToolBar>
code behind:
Code: C#
protected void Page_Load(object sender, EventArgs e)
{
SetupToolbarControl();
}
private void SetupToolbarControl()
{
EO.Web.ToolBarItem tiToolbarItem;
DropDownListTemplate ddlTemplate;
ListItem liListItem;
ListItemCollection licCollection;
TextBoxTemplate tbtTextBox;
ToolBar2.Items.Clear();
ToolBar2.ItemClick += new ToolBarEventHandler(ToolBar2_ItemClick);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.Type = ToolBarItemType.Custom;
//
licCollection = new ListItemCollection();
liListItem = new ListItem("User Admin", "USER_ADMIN");
licCollection.Add(liListItem);
liListItem = new ListItem("Top Bottom", "VERTICAL_PAGE");
licCollection.Add(liListItem);
liListItem = new ListItem("Left Right", "HORIZONTAL_PAGE");
licCollection.Add(liListItem);
//
ddlTemplate = new DropDownListTemplate("ddlEO", licCollection);
ddlTemplate.List.SelectedIndexChanged += new EventHandler(ddlEO_SelectedIndexChanged);
tiToolbarItem.CustomItem = ddlTemplate;
tiToolbarItem.Type = ToolBarItemType.Custom;
ToolBar2.Items.Add(tiToolbarItem);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.Type = ToolBarItemType.Separator;
ToolBar2.Items.Add(tiToolbarItem);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.ImageUrl = "~/Images/Refund.gif";
ToolBar2.Items.Add(tiToolbarItem);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.ImageUrl = "~/Images/void.gif";
tiToolbarItem.CommandName = "ShowDetails";
tiToolbarItem.Disabled = true;
ToolBar2.Items.Add(tiToolbarItem);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.Type = ToolBarItemType.Separator;
ToolBar2.Items.Add(tiToolbarItem);
tiToolbarItem = new ToolBarItem();
tiToolbarItem.Type = ToolBarItemType.Separator;
ToolBar2.Items.Add(tiToolbarItem);
tbtTextBox = new TextBoxTemplate();
//
tiToolbarItem = new ToolBarItem();
tiToolbarItem.CustomItem = tbtTextBox;
tiToolbarItem.Type = ToolBarItemType.Custom;
ToolBar2.Items.Add(tiToolbarItem);
}
protected void ToolBar2_ItemClick(object sender, ToolBarEventArgs e)
{
// do something
}
protected void ddlEO_SelectedIndexChanged(object sender, EventArgs e)
{
// do something
}
}
public class TextBoxTemplate : ITemplate
{
private TextBox m_tbTextBox;
public TextBoxTemplate()
{
m_tbTextBox = new TextBox();
m_tbTextBox.ID = "tb1";
m_tbTextBox.Text = "testing";
m_tbTextBox.Width = Unit.Pixel(200);
m_tbTextBox.AutoPostBack = false;
}
public void InstantiateIn(System.Web.UI.Control container)
{
container.Controls.Add(m_tbTextBox);
}
}
public class DropDownListTemplate : ITemplate
{
private DropDownList m_ddlList;
public DropDownList List { get { return (m_ddlList); } }
public DropDownListTemplate(string szID, ListItemCollection collection)
{
int nCount;
m_ddlList = new DropDownList();
m_ddlList.ID = szID;
m_ddlList.AutoPostBack = true;
for (nCount = 0; nCount < collection.Count; nCount++)
{
m_ddlList.Items.Add(collection[nCount]);
}
}
public void InstantiateIn(System.Web.UI.Control container)
{
container.Controls.Add(m_ddlList);
}
}
I do set the Type to Custom for the tenplated ToolbarItems but the Toolbar still behaves incorrectly. Is there anything wrong I'm doing? Cheers
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
This seems to be an issue and we will see what we can do. Opera is a dead browser so it is low on our priority list. FireFox is causing a lot of issues with its new fast releasing cycle (break things very often with new release), but we will see what we can do.
You may want to consider purchase a license for any of our product. Our official policy is that we do not offer tech support for our free controls.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
We have posted a new build that should fix the issue for both browsers. Please see your private message for the download location of the new build.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/11/2012 Posts: 5
|
I've just downloaded the last version. TextBoxes are not working. It seems they are disabled.
DropDownLists are OK.
Any solution or workaround to this issue?
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, Please remove the following line in your code:
Code: C#
tiToolbarItem.Type = ToolBarItemType.Custom;
Do NOT set the item type to "Custom" (it supposes to allow you to do so but apparently if you do that it won't work on FireFox). As long as you remove that line it should work for you. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/11/2012 Posts: 5
|
Hello!
Removing the Type="Custom" property works for enabling the TextBox. I can type on it, but now when I click it, it fires the ItemClick event and clears the TextBox text. I have to click and write as fast as lightning to write something. All browser have the same behavior.
The ItemClick event has a switch case that calls another methods according to which button you click. But there's no case for the TextBox.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
That's the trade off of it. You can write some additional code in your custom item to prevent item click event on mouse click. Our code automatically prevents click event when you use custom item, however that obviously prevents the textbox from accepting focus as well on FireFox. Bypassing this logic would cause the click event to fire.
This issue is now closed. If you still need help on this issue, please purchase a license for any of our product to become a paid user. Once you are a paid user, we will be happy to work with you further.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/11/2012 Posts: 5
|
Hi,
I really would like to buy it. But how can you ask me to buy something that is not working? Your're asking me to become a paid user so you can help me workarounding a problem on your component that has a known problem and you don't feel like you're fixing it.
Ok. If I buy it today, will it work? Because your free version seems not to be trustful.
I understand Firefox is crashing some component's features (Had problems with other components. That's why I'm trying yours), but I don't think the best way to treat that is asking people to buy non-working components, otherwise you're not doing anything.
Best regards,
Renan.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Yes. If you buy it today, it will work for you. The issue you are having is not an issue on the toolbar itself. You just need to write code to disable the click event for the custom item. We can show you how to write such code, but in order to continue receiving such level of tech support, you must to be a paid user first. Our official policy is that we do not provide tech support on our free controls at all. In this case, we have already pointed you to the right way, but we cannot provide endless free tech support to you unless you become a paid user first. Hope you understand.
Thanks!
|
|