开发者

ext.net / How to run server-side method on Row Click in GridPanel?

Hey, messing about with ext.net and running into a few minor issues.

Im trying to run a server-side method when a user clicks on a row in a GridPanel. From the examples I read on the Internet it should be straight forward, but it is not working.

So, I have a GridPanel (in MyTest.aspx)

<ext:GridPanel ... >
   ...
   <Listeners>
       <RowClick Handler="SetCustomer"/>
   </Listeners>

and then the server-side method (in MyTest.aspx.cs)

    [DirectMethod]
    public void SetCustomer()
    {
        uint customerId = 0;
        // does nothing
    }

The SetCustomer is not executed, but the listener is working. I check this by instead of

<RowClick Handler="SetCustomer"/>

I do

<RowClick Handler="aler开发者_运维技巧t('test')"/>

and that works. So, any ideas would be appreciated =)


<RowClick Handler="Ext.net.DirectMethods.SetCustomer();"/>

See http://examples.ext.net/#/Events/DirectMethods/Overview/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜