Jun 30, 2008, 5:06 PM
ext:Button CommandArgument
I use a click listener, autopostback is off for the ext:Button. Click listener is a client-side function. Is it possible in the client-side function to get not only id of the ext:Button, but also the CommandArgument?
... wrapped in templated asp:ListView ...
<ext:Button ID="btnDelete" runat="server" CommandName="DeleteItem" CommandArgument='<%# Eval("ID")%>' Text="Delete" Icon="Delete" StyleSpec="display:inline;vertical-align:middle;" AutoPostBack="False">
<Listeners>
<Click Fn="doDelete" />
</Listeners>
</ext:Button>
...
and client-side:var doDelete = function(sender) {
val el = document.getElementById('<%= hiddenDeleteButton.ClientID %>');
-> here I need to add the onclick attribute to el for __dopostback with needed argument. How do I get the argument?
el.click();
};
Thank you!