Hi Charan,
Thanks for using Syncfusion Products.
We can get the selected item of Popup item list in Split-Button Widget using “itemSelected” Event. Please follow the below given code snippet to achieve this.
[HTML]
<button id="splitbuttonnormal">Save</button>
<ul id="menu1">
<li><span>Open...</span></li>
<li><span>Save</span></li>
<li><span>Delete</span></li>
</ul>
[SCRIPT]
$("#splitbuttonnormal").ejSplitButton({
size: "large",
roundedCorner: true,
targetId: "menu1",
itemSelected: "spltbtnitmSelected"
});
function spltbtnitmSelected(e) {
alert(e.Events.menuText + " item has been selected.");
}
Please let us know if this helps.
Thanks/Regards,
John Arokyaraj.V
Hi charan,
Sorry for the Inconvenience caused.
we are not able to reproduce the issue. Can you please check with the sample in the following location? If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you.
Sample : Split-Button Sample
Please let us know if you need any further assistance.
Thanks/Regards,
John Arokyaraj.V
<button id="splitbuttonnormal">Save</button>
<ul id="menu1">
<li id="1"><span>Open...</span></li>
<li id="2"><span>Save</span></li>
<li id="3"><span>Delete</span></li>
</ul>
I want id of selected (li) item in the itemSelected event .how can I get that??
Hi charan,
Sorry for the Inconvenience caused.
We can get the selected items ID of Popup item list in Split-Button Widget using “itemSelected” Event. Please follow the below given code snippet to achieve this.
[HTML]
<button id="splitbuttonnormal">Save</button>
<ul id="menu1">
<li id="1"><a rel='nofollow' href="#">User</a></li>
<li id="2"><a rel='nofollow' href="#">Guest</a></li>
<li id="3"><a rel='nofollow' href="#">Admin</a></li>
</ul>
[SCRIPT]
$("#splitbuttonnormal").ejSplitButton({
size: "large",
roundedCorner: true,
targetId: "menu1",
itemSelected: "spltbtnitmSelected"
});
function spltbtnitmSelected(args) {
alert("Item" + args.Events.element.id + " has been selected.\n");
}
Please let us know if this helps.
Thanks/Regards,
John Arokyaraj.V