English 中文(简体)
Telerik MVC 客户 从未发生过事件
原标题:Telerik MVC Grid ClientEvents are never fired

我正在使用以下法典向客户事件开火,而且事件没有发射:

Telerik MVC Grid

@Html.Telerik().Grid(Model.Customers)
               .ClientEvents(events => events.OnRowDataBound("onDataBound"))
               .... further code

 function onDataBound(sender,eventArgs) { alert(eventArgs);}
问题回答

Maybe you are using server binding, client events are fired with ajax binding only. You may refer to the grid s documentation here.

文字如下:

function onDataBound(e) {
    alert(e)
}

That should fix the problem.





相关问题
Discuss on Commercial Component libraries of silverlight

I am now looking forward to buy a component library of silverlight for increase the productivity. I find there are number of them. Telerik ComponentOne ComponentArt Infragistics Syncfusion I found ...

Telerik RadGrid: grid clientside pagination

I have a web service which returns me some data,I am massaging this data and using this as datasource for my radgrid (telerik). The datasource is quite large, and would like to paginate it. I found ...

Binding a radgrid to a tree like data structure

I have a structure that looks following Class TreeNode { public TreeNode Parent { get; } public IEnumerable<TreeNode> Children { get; } public . . . . } I want to bind this to a ...

IQueryable into a hierarchy

I currently have an IQueryable of Questions. In my Question object I have and "id" and a "parentId" which can be used to create a hierarchy. Currently, I bind a RadTreeView to the IQueryable of ...

Expand all items in RadGrid Hierarchy

I am using a RadGrid (2009 Q2) with a hierarchy. Is there a way in the client api to expand all rows and vice-versa? thanks! Update: I have written a javascript function based off the api ...

热门标签