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

Selected row not working properly with Window

3 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 29 Jan 2013, 10:41 PM
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?

 

 

 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 31 Jan 2013, 04:46 PM
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!
0
Don
Top achievements
Rank 1
answered on 31 Jan 2013, 04:54 PM
So is there an event for the grid that I should be looking at instead?
0
Daniel
Telerik team
answered on 04 Feb 2013, 02:23 PM
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!
Tags
Grid
Asked by
Don
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Don
Top achievements
Rank 1
Share this question
or