Selected row not working properly with Window

4 posts, 0 answers
  1. Don
    Don avatar
    4 posts
    Member since:
    Jan 2013

    Posted 29 Jan 2013 Link to this post

    I want the user to be able to make a selection in my grid and then when they close the grid I want the selection passed back to a text box on my page.  My grid is actually in a window.  So the user clicks a button, it opens my grid and shows a table.  I have all of this code working, but now I need to have the selected item passed back to the text box.  I have tried this function on the close event of the window.
    function onClose() {
        var selected = $.map(this.select(), function(item) {
            return $(item).text();
        });
        $("#safekeep").text = selected.toString;
    }

    Any suggestions? Or is there a tutorial somewhere for this?

     

     

     

  2. Daniel
    Admin
    Daniel avatar
    2230 posts

    Posted 31 Jan 2013 Link to this post

    Hello Don,

    The close event is called in the context of the Window and not the Grid. Thus you should find the Grid object in order to use it.

    Regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Don
    Don avatar
    4 posts
    Member since:
    Jan 2013

    Posted 31 Jan 2013 Link to this post

    So is there an event for the grid that I should be looking at instead?
  4. Daniel
    Admin
    Daniel avatar
    2230 posts

    Posted 04 Feb 2013 Link to this post

    Hello Don,

    You could use the change of the Grid to set the value immediately after the row is selected. If the value should be changed only when the Window is closed, then you should use the close event and find the Grid object.

    Kind regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top