Possible bug: loosing reference to datasource

3 posts, 0 answers
  1. Jason
    Jason avatar
    6 posts
    Member since:
    Sep 2012

    Posted 13 Aug 2012 Link to this post

    I'm not the most adept with Javascript or Kendo, so this may be a bug, or it might just be my noobism showing.

    I have a Kendo Grid created from the MVC stuff in the fluent library.   It's named "DocumentsGrid". It works fine.  No complaints, until I created a Custom Command on the grid that executes a javascript function named showRevisions.

    <div id="RevisionWindow"></div>
    <script language="javascript">
        function showRevisions(e) {
            var documentId = 1234;
            var wnd = $("#RevisionWindow").kendoWindow({
                content: "somecrazyurl?documentId=" + documentId ,
                title: "Revisions for Document " + documentId,
                width: "750px",
                height: "480px",
                modal: true,
                actions: ["Close"]

    This all executes fine.   Unfortunately, however, sometime after this function has completed, any javascript that relies on $("#DocumentsGrid").data("kendoGrid").dataSource fails.  I debugged through the code and the exact line of code where $("#DocumentsGrid").data("kendoGrid").dataSource begins returning null is in the jquery.js library, approximately line  8324:

    complete(status, statusText, responses, responseHeaders);

    The consequence of this is that I'm unable to do any paging or advanced manipulation of data in javascript once the window has been opened because most of the attributes on the DocumentsGrid object don't appear to be there anymore. 

    Is this a bug in jquery, kendo, or am I expected to reconstruct the grid every time I after I manipulate windows?


  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 16 Aug 2012 Link to this post


     This sounds similar to this problem. Please try the suggested solution.

    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Jason
    Jason avatar
    6 posts
    Member since:
    Sep 2012

    Posted 16 Aug 2012 Link to this post

    That is the solution that I was looking for.  Thanks Atanas!
Back to Top