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

Populating Kendo Window with Data from Kendo Grid on click of Edit

6 Answers 976 Views
Window
This is a migrated thread and some comments may be shown as answers.
bharath
Top achievements
Rank 1
bharath asked on 06 Mar 2015, 10:24 AM
Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

 if (window != null) {
                     
                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                               
                                , content:' /api/Foo/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }
Im currently getting data from Kendo selected row of kendo grid. I just need to put it into the textboxes/ddls in the Window. Creating a record using the data from the window  is completed. i.e Able to get the data from window.. Dont know how to put the data into the window. Please help !Thanks! 
   



























Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

6 Answers, 1 is accepted

Sort by
0
bharath
Top achievements
Rank 1
answered on 06 Mar 2015, 10:28 AM
And btw I tryd doing content:'api/info' but that Api controller action isnt getting called...why is the content: used actually?
0
Accepted
Dimo
Telerik team
answered on 10 Mar 2015, 08:37 AM
Hello Bharath,

You can use the approach demonstrated here:

http://docs.telerik.com/kendo-ui/web/grid/how-to/Editing/custom-editor-outside-the-grid

The Kendo UI Window can load a partial view with Ajax, or display static HTML content, depending on your preferences. If the content is loaded via Ajax, you should call kendo.bind() in the Window's refresh event.

http://docs.telerik.com/kendo-ui/api/javascript/ui/window#events-refresh

I am not sure why the action method isn't called. Have you inspected the browser's developer console? Is a request being made?

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
bharath
Top achievements
Rank 1
answered on 12 Mar 2015, 04:47 AM
Thank you Dimo.. While working on it I found an issue.. I have a Kendo Grid in that window.. The defaultValue: Is not working.. The defaultValue  for grids which are not present in kendo window are working fine.. Is this a known issue ?! Can you pls look into it?! For both inline and popup its not showing any value...
0
Accepted
Dimo
Telerik team
answered on 13 Mar 2015, 05:01 PM
Hello Bharat,

The provided information is not sufficient for me to understand what exactly is your scenario. Here is a demo, in which the Grid is inside a Window, an external editor is used, and defaultValue works when adding new items. Feel free to modify it until the problem is reproduced.

http://dojo.telerik.com/@dimodi/IZeVa

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
bharath
Top achievements
Rank 1
answered on 16 Mar 2015, 06:24 AM
Hi Dimo.. 
    What I want is a kendo grid which is present inside a kendo window.. And the grids  edit mode should be inline. And when i click on Create.. The defaultValue which we specify in the model should be present in that inline row?.. I kinda modified your dojo.. Im missing something tho..Inline editing is not working..Its directly adding the DefaultValue..I need the first row to go into edit mode when i click on
"Add new Record".. Can you please check this out and lemme know what im missing? 
http://dojo.telerik.com/APuhe
Thanks..
0
bharath
Top achievements
Rank 1
answered on 16 Mar 2015, 06:38 AM
Now im able to producethe solution in dojo but not the problem..:| Im doin lots of things in my gird..Not able to localize the problem..Will get back to you once i do...
Thanks again
Tags
Window
Asked by
bharath
Top achievements
Rank 1
Answers by
bharath
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or