This question is locked. New answers and comments are not allowed.
Hi
I have a problem getting the following to work:
Any ideas?
Pierre-Andre
I have a problem getting the following to work:
| var grid = $('#CurrentActivitiesGrid').data('tGrid'); |
| or |
| var grid = $(this).data('tGrid'); <-- in event handler |
In both cases, the grid is undefined. $('#CurrentActivitiesGrid') is shows up as an object in the debugger and this as a DispHTMLDivElement.
The grid works fine when using Ajax binding, but I want to call dataBind(). Grid is defined as follows:
| <%=Html.Telerik().Grid<PlanActivity>() |
| .Name("CurrentActivitiesGrid") |
| .Columns(columns => |
| { |
| columns.Add(a => a.ActivityId).Format(this.CheckBox("Select") |
| .Id("_selectActivity_{0}").ToString()).Encoded(false).Title("Select"); |
| columns.Add(a => a.ActivityName).Title("Name"); |
| columns.Add(a => a.ActivityId) |
| .Format(this.Button("Remove").Id("_removeActivity_{0}").OnClick("RemoveActivity({0})").ToString()) |
| .Title("Remove"); |
| }) |
| .ClientEvents(events=>events.OnError("onGridError")) |
| .ClientEvents(events => events.OnLoad("onGridLoad")) |
| %> |
Any ideas?
Pierre-Andre