rnfigueira, as far as I know you are not supposed to call DirectEvents from javascript. For this purpose DirectMethods were created.
Recently I had to implement a callback to be called after a drag from a MultiSelect to a GridPanel. In order to achieve that I had to use a "notifyDrop" javascript function, which called a DirectMethod like this:
<script type="text/javascript">
var notifyDrop_GruposUsuario = function (ddSource, e, data) {
// etc...
Ext.net.DirectMethods.InserirUsuarioEmGrupos(codGrupos, {
success: function(result) {
Ext.each(data.records, function(record) {
addRow(Store_GruposUsuario, record, ddSource);
});
},
failure: function(errorMessage) {
Ext.Msg.alert('Falha', errorMessage);
},
eventMask: {
showMask: true,
msg: 'Aguarde...',
minDelay: 500,
customTarget: 'GridGruposUsuario'
}
});
</script>
and in my .aspx.cs file I have the 'InserirUsuarioEmGrupos' function defined:
[DirectMethod]
public string InserirUsuarioEmGrupos(string grupos_json)
{
// ...
}
Consider taking a look at DirectMethods in the Ext.NET Examples Browser.