how to write client side events functions for the combobox items
<dx:ASPxComboBox ID="ASPxComboBox2" runat="server" ClientIDMode="AutoID"
SelectedIndex="-1" onselectedindexchanged="ASPxComboBox1_SelectedIndexChanged1" >
<ClientSideEvents SelectedIndexChanged="function(s, e) {
grid.SelectRows();}" />
<Items>
<dx:ListEditItem Text="Selecte All Rows" />
<dx:ListEditItem Text="UnselectAll" />
</Items>
</dx:ASPxComboBox>
I want to write event for the "unse开发者_如何学Pythonlect all" item in combobox. How can I do this?
You'll need to write a JavaScript function that iterates thru the combo-box and marks all selected items as false.
See Select/unselect all checkbox fields using pure Javascript and HTML for sample code
MSDN: Working with Client-Side Script
Use jQuery
$('input:checkbox').each( function() {
this.checked = false;
});
精彩评论