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

7 posts, 2 answers
  1. bharath
    bharath avatar
    5 posts
    Member since:
    Nov 2014

    Posted 06 Mar 2015 Link to this post

    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!

  2. bharath
    bharath avatar
    5 posts
    Member since:
    Nov 2014

    Posted 06 Mar 2015 in reply to bharath Link to this post

    And btw I tryd doing content:'api/info' but that Api controller action isnt getting called...why is the content: used actually?
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 10 Mar 2015 Link to this post

    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!
     
  5. bharath
    bharath avatar
    5 posts
    Member since:
    Nov 2014

    Posted 11 Mar 2015 in reply to Dimo Link to this post

    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...
  6. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 13 Mar 2015 Link to this post

    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!
     
  7. bharath
    bharath avatar
    5 posts
    Member since:
    Nov 2014

    Posted 16 Mar 2015 in reply to Dimo Link to this post

    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..
  8. bharath
    bharath avatar
    5 posts
    Member since:
    Nov 2014

    Posted 16 Mar 2015 Link to this post

    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
Back to Top
Kendo UI is VS 2017 Ready