This is a migrated thread and some comments may be shown as answers.

ListView data is null when dataBound event fires

0 Answers 148 Views
ListView
This is a migrated thread and some comments may be shown as answers.
David Ching
Top achievements
Rank 1
David Ching asked on 05 Mar 2013, 08:33 PM
$(document).ready(function () {
      $("#listView").kendoListView({
          dataBound: function (e) {
              var listView = $("#listview");
              if (!listView) {
                  alert("listView null");
                  return;
              }
              var listData = listView.data("kendoListView");
              if (!listData) {
                  alert("listData null");
                  return;
              }
          }
      });
The above code shows "listData null".  I need to access .data() and thought the purpose of the dataBound() event was to indicate when I could do so.  What event should I use if not this one?

Thanks,
David

EDIT:  I'm sorry, it was my mistake.  I should have typed "listView" instead of "listview".  After this change, I can access .data() from the dataBound() event handler.

No answers yet. Maybe you can help?

Tags
ListView
Asked by
David Ching
Top achievements
Rank 1
Share this question
or