Click or drag to resize
KaxComboBoxOnClientSelectedIndexChanging Property
The client-side event that is fired when the selected index of the KaxComboBox is about to be changed.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientSelectedIndexChanging { get; set; }

Property Value

Type: String
Remarks

The event handler receives two parameters: the instance of of the KaxComboBox client-side object and event argument of the newly selected item.

The event can be cancelled - simply call args.set_cancel(true); from the event handler and the item will not be changed.

Examples
JScript
<script type="text/javascript">               
    function onSelectedIndexChanging(sender, eventArgs)
    {
        var item = eventArgs.get_item();
        if (item.get_text() == "LA")
        {
            // do not allow selecting item with text "LA"   
            return false; 
        }
        else
        {
            // alert the new item text and value.
            alert(item.get_text() + ":" + item.get_value());
        }
    }                        
</script>

<kettic:kaxcombobox ID="KaxComboBox1" runat="server" 
      OnClientSelectedIndexChanging="onSelectedIndexChanging">
</kettic:kaxcombobox>
See Also