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

loading kendo mvvm grid in kendo window

5 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Veteran
Neeraj asked on 08 Sep 2017, 08:30 AM

Hello,
           I have a scenario where want to load kendo grid  in kendo window on button  The button is in external template  by . Please suggest something by which can close and exit/hide grid  and window easily


Grid MVVM external Script:

<script id="FeeGrid" type="text/x-kendo-template" class="KendoExtTemplate">
     
    <div id="feegridContainer">
        <div data-role="grid"
             data-editable="true"
             data-toolbar="['create', 'save']"
             data-columns="[
                                 { 'field': 'FeeCurrency', 'width': 270 }
                              ]"
             data-bind="source: FeeBreakup"></div>
    </div>
 
</script>

 

01.<script id="Heads" type="text/x-kendo-template" class="KendoExtTemplate">
02.    <div>
03.        <input data-role="numerictextbox" data-min="0" data-bind="value: Gross_Fare">
04.        <input data-role="numerictextbox" data-min="0" data-bind="value: TotalFee"><button data-role="button"
05.        data-icon="edit"
06.        data-bind="click: OpenFeeGrid"
07.        ></button>
08.    </div>
09. 
10.</script>

 

 

the OpenFeeGrid , should trigger to show / hide  kendo Window with Grid inside.

5 Answers, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 12 Sep 2017, 12:46 PM
Hi Neeraj,

To show and hide a Kendo MVVM window from a button, I would suggest binding the visible configuration to a boolean variable. For example:

data-bind="visible: isVisible"
...
 
var viewModel = kendo.observable({
   isVisible: true
});

For a runnable example, check this Demo:
Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 13 Sep 2017, 10:47 AM
 Thanks for the reply, I have done that, now at the intial start the window is hidden and it has a grid inside. So, when it is hidden and when I click on the button to show grid, the data in the grid is empty
          But when I set visible true for the window at the start , that data for the grid is properly.  How to solve problem for grid when is hidden?
0
Preslav
Telerik team
answered on 15 Sep 2017, 07:59 AM
Hi Neeraj,

To overcome this issue, I would suggest checking the relevant documentation. It is available here:
Additionally, I would also suggest checking this how to article:
Please, give the above a try and let me know if you have any further questions.


Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 18 Sep 2017, 11:46 AM
Preslav,
            The above links  helped. Let me explain once again: I have external kendo template in that had another template script which has kendo window and that contains kendo grid.

1) when set kendo window visible =true it works as expected.
2) when set kendo window visible the data bind to .
0
Preslav
Telerik team
answered on 20 Sep 2017, 10:33 AM
Hello Neeraj,

Based on the provided information, I am not sure if I fully understand the scenario.

Having said that, could you please share an example that demonstrates and isolates the issue? Checking and testing this example will help me fully understand the case and provide assistance to the best of my knowledge.

I look forward to your reply.


Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Neeraj
Top achievements
Rank 1
Veteran
Answers by
Preslav
Telerik team
Neeraj
Top achievements
Rank 1
Veteran
Share this question
or