PDA

View Full Version : [OPEN] [#237] Splitbutton navigation functionality



blueworld
May 14, 2013, 9:38 AM
Hi,
I have a splitbutton with three menuitems. I am creating this splitbutton in the code behind:



Dim split As New Ext.Net.SplitButton()
split.ID = "Split" + kvp.Key + "ID"
split.Text = kvp.Key
split.AutoPostBack = False
split.Href = kvp.Value
split.HrefTarget = "_self"


The menuitems do look the same and work fine.

However, if I click the splitbutton itself, it does not react, but I can see the href URL on mouseover in my browser bottombar.
What might be the problem with this one?

Daniil
May 14, 2013, 11:57 AM
Hi @blueworld,

Currently, a SplitButton doesn't support the href functionality. I reported to Sencha.
http://www.sencha.com/forum/showthread.php?263622

For now I can suggest the following fix.

Fix

Ext.button.Split.override({
onClick: function (e, t) {
var me = this;

//e.preventDefault(); // this prevents href functionality
if (!me.disabled) {
if (me.overMenuTrigger) {
me.maybeShowMenu();
me.fireEvent("arrowclick", me, e);
if (me.arrowHandler) {
me.arrowHandler.call(me.scope || me, me, e);
}
} else {
me.doToggle();
me.fireHandler(e);
}
}
}
});

Please tell if you face any issue with this fix.

Daniil
May 14, 2013, 1:59 PM
Sencha opened a bug.

We created an Issue to track this defect.
https://github.com/extnet/Ext.NET/issues/237

Baidaly
Aug 05, 2013, 10:19 PM
Related thread: http://forums.ext.net/showthread.php?25930