PDA

View Full Version : [CLOSED] Adding a Listener to a ComboBox Subclass



xtoolz
Mar 16, 2015, 12:08 PM
Good Morning all

I got a ComboBox Object which is as Subclass of the Ext.Net.ComboBox. Now I need to add a Handler to the Select Event of this Combo...

Thats my Code so far...



Public Class CodeComboBox
Inherits ComboBox

...
Private Sub CodeComboBoxBeforeClientInit(sender As Observable) Handles Me.BeforeClientInit



Listeners.Select.Handler = "validateCurrentValue"



End Sub

<DirectMethod()>
Public Function validateCurrentValue()

Return True

End Function


End Class




The Handler can't be found like that. What is the correct Parameter for


Listeners.Select.Handler = "validateCurrentValue"

In my case ?

Thanks for your Help

Peter

Daniil
Mar 16, 2015, 3:42 PM
Hi Peter,

There are two moments, at least.

1. Please see the sources of #1 here:
http://examples2.ext.net/#/Events/DirectMethods/Overview/

The SetTimeStamp DirectMethod is called with:

<Click Handler="App.direct.SetTimeStamp();" />

By default, JavaScript call functions of DirectMethods are shared in the `App.direct` namespace.

2. If you encapsulate DirectMethods to a control, please read this thread:
http://forums.ext.net/showthread.php?15060