kendo-grid

Can't add new object to KendoUI grid if filter is applied to any column

自古美人都是妖i 提交于 2020-04-30 07:47:16
问题 I use KendoUI grid with popup edit mode. After applying filter to any column it is not possible to add new object correctly. Pressing Add button many times does not show edit popup. But after clearing the filter empty objects are shown in the grid. Is there any workaround? 回答1: I found a workaround. Instead of standard Add button use toolbar template in which add link "Add" with custom handler triggering grid add. In that handler check if filtering is used on grid and if so store current

How to hide or show the columns in Kendo grid conditionally

不羁岁月 提交于 2020-04-30 05:01:17
问题 We usually write this if we have to hide a column in kendo grid. { field: "Name", hidden: true }, but I want to use condition in the hidden. The true or false would come from database in another field i.e HideShow. Is there any option if I can set this. { field: "Name", hidden: HideShow}, HideShow = true/false will be set while getting records from database. I have tried hide and showing by jquery also but it is distorting the grid layout while showing. Hide is working fine. 回答1: Define a

How to hide or show the columns in Kendo grid conditionally

隐身守侯 提交于 2020-04-30 04:59:24
问题 We usually write this if we have to hide a column in kendo grid. { field: "Name", hidden: true }, but I want to use condition in the hidden. The true or false would come from database in another field i.e HideShow. Is there any option if I can set this. { field: "Name", hidden: HideShow}, HideShow = true/false will be set while getting records from database. I have tried hide and showing by jquery also but it is distorting the grid layout while showing. Hide is working fine. 回答1: Define a

kendo grid column with conditionally chosen action

不羁岁月 提交于 2020-02-24 05:51:04
问题 Here is what I got: columns.Bound(t => t.Id) .Title("") .Template(@<text></text>) .ClientTemplate("<a class=\"k-button\" href='" + Url.Action("Edit", "Controller") + "/#=Id#'>Edit</a>") .Width(110); What I need is to pick a specific controller action depending on type of object bound. (different form for e.g. CarEdit when lets say Type==1 and PlaneEdit when Type==2 ) I've done similar thing using JS recently (to produce ClientTemplate content) but would greatly appreciate solution without

Kendo Grid: add new row with nested object stopped working

心不动则不痛 提交于 2020-02-05 07:33:05
问题 I'm filling a Kendo data grid from nested JSON by this way: https://stackoverflow.com/a/24441318/535556 Everything works fine until I click on the "Add new row" button. Then I receive a console error message: "Uncaught TypeError: Cannot read property 'street' of undefined " I would like to ask how to format the data properly to obtain nested JSON object with updated data? Many thanks for any advice. 回答1: When you add a new row without having defined a schema model for the dataSource, the

ng-template Error: The template context does not define a member called … (Kendo Grid)

跟風遠走 提交于 2020-02-04 00:46:54
问题 I have an issue when trying to use ng-template with Kendo Grid in Angular. The html I have is valid and compiles and functions properly when launched, but then Visual Studio Code shows this error: The template context does not define a member called column Here is my code: <kendo-grid-column field="countryID" title="{{ 'location.country' | translate }}" width="10"> <ng-template kendoGridEditTemplate let-dataItem="dataItem" let-column="column" let-formGroup="formGroup"> <app-dropdown-single

ng-template Error: The template context does not define a member called … (Kendo Grid)

て烟熏妆下的殇ゞ 提交于 2020-02-04 00:46:08
问题 I have an issue when trying to use ng-template with Kendo Grid in Angular. The html I have is valid and compiles and functions properly when launched, but then Visual Studio Code shows this error: The template context does not define a member called column Here is my code: <kendo-grid-column field="countryID" title="{{ 'location.country' | translate }}" width="10"> <ng-template kendoGridEditTemplate let-dataItem="dataItem" let-column="column" let-formGroup="formGroup"> <app-dropdown-single

Kendo Grid Custom Toolbar button Enable/Disable

跟風遠走 提交于 2020-02-02 16:25:21
问题 I have a kendo grid with save button in the Tool bar panel. I have a proposed discount column which is editable and if the user enters whole numbers between 0 and 100(excluding decimals) , the save button should be visible or enabled otherwise invisible or disabled. I was able to achieve making the button invisible or disable but when they enter correct value, the button was not getting visible or enabled. Please help me. I just started working on Kendo UI recently. function setEnabled

Kendo Grid Custom Toolbar button Enable/Disable

此生再无相见时 提交于 2020-02-02 16:24:31
问题 I have a kendo grid with save button in the Tool bar panel. I have a proposed discount column which is editable and if the user enters whole numbers between 0 and 100(excluding decimals) , the save button should be visible or enabled otherwise invisible or disabled. I was able to achieve making the button invisible or disable but when they enter correct value, the button was not getting visible or enabled. Please help me. I just started working on Kendo UI recently. function setEnabled

Is it possible to copy a grid datasource to a new datasource, a new datasource that loads all data?

筅森魡賤 提交于 2020-02-02 12:29:06
问题 Is it possible to copy a grid datasource to a new datasource, a new datasource that loads all data? For example I have a kendo grid which has a page size of 10, how would I copy it into a new datasource which will load all the data and ignore the paging. 回答1: Some aspects might depend on how did you define the DataSource of the first (pageable) datasource. But basically you need to copy the original data source, then change the value for pageSize and serverPaging and finally assign it to the