Comments (8)
Hello Glenn,
can you post a sample for using kendo templates for a cell of a grid? I had difficulties with that approach.
Thanks!
Kind Regards
Thomas
from angular-kendo.
It's not very difficult. I do it the easy way: I pass an html snippet to the column config:
columns = [
{field:"myobject", template: "<a href='#= myobject.link#'>#=myobject.label#</a>"}
]
The problem I have now is that sorting and filtering won't work anymore and it seems that Telerik doesn't support this...
from angular-kendo.
Hi Glenn, thank you for your fast answer. I will try your solution! Further I will hope you find a solution for your problem with the sorting and filtering!
from angular-kendo.
@glenndejaeger I'm going to propose this as part of the 0.6 release, but Kendo UI templates don't work the same way that Angular does. Kendo UI actually evals the template and creates a new function. This allows you to embed JavaScript in your templates.
from angular-kendo.
I have a problem when using a directive in a cell template. My directive is called this way in the template:
<div bp-link="#= description.link #" label="#= description.label #"></div>
The content of the bp-link directive is:
<a class="bp-link" title={{label}}>{{label}}</span> <i class="icon-share" ng-click="followLink(true)"></i></a>
Now, when I view the grid, this is the HTML that's generated in the cell:
<a class="bp-link ng-binding" title="MYTITLE" bp-link="MYLINK" label="MYTITLE">MYTITLE<i class="icon-share" ng-click="followLink(true)"></i></a>
After sorting on that column, the directive isn't replaced and this this is the content of a cell in this column:
<div bp-link="`MYLINK" label="MYTITLE" class="ng-isolate-scope ng-scope"></div>
``
How can I tell Kendo Grid that after sorting (or client side paging too), the directive needs to be re-evaluated?
from angular-kendo.
@glenndejaeger We can recompile the rows when the dataSource "change" event fires. Can you replicate the issue in a Plunk and then I'll see about adding the compilation step in and check the fallout.
from angular-kendo.
Any progress on this issue? It's quite critical I suppose. In short we cannot use angular for cells
from angular-kendo.
Here's a plunker showing Angular templates in columns: http://plnkr.co/edit/R1tXm2TOJ3FnASUoYo3e?p=preview
When you click the "show" you'll get details in a dialog, and you can even edit. The third column (Location) displays {{dataItem.City}}, {{dataItem.Country}}
and gets updated properly as you edit the city/country in that dialog.
Sorting is not supported currently for template columns.
If there are any other issues you guys see here, please post a plunker that demonstrates them.
from angular-kendo.
Related Issues (20)
- kendo angular grid
- Isolating the "kendo-ness" in our architecture
- pagination not working in kendo grid using angular...
- how do i set min date to yesterday for kendo ui datepicker?
- Multiselect selected values on load via ajax datasource and k-ng-model HOT 1
- Angular kendo-date-picker fails to update ng-model
- Kendo combo box sets ng-model to blank when setting source and value asynchronously
- Can't Refresh Grid
- Add behavior to component (grid) with angular directives HOT 1
- Kendo UI Grid k-data-bound HOT 2
- Date Format incorrect after select date HOT 1
- Is "angular-kendo.js" free to use? HOT 2
- k-rebind listview HOT 1
- AutoCompleteComponent: Arrays of Complex Data HOT 1
- Cannot read property 'model' of undefined HOT 1
- kendo ui - autocomplete (no value accessor error) HOT 1
- Grid > SelectionChangeEvent: deselectedRows empty when used with virtual scrolling HOT 1
- expand button on a kendo table that opens detail in a kendo table format HOT 1
- Kendo Multiselect dropdown selection loss in filtering
- Kendo Grid expand all detail row caused web browser crashed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-kendo.