Render HTML from JSON datasource in Kendo Grid Column using Vue.js - html

Trying to render HTML data in kendo Grid column using Vue.js.
Code Snippets are as below:
JSON data-
Template -
Can anybody suggest how to achieve it?

I am able to get the hyperlinks from JSON using props in kendo-grid in vue js.
Please find the below screenshots.
[KendoUI.vue page] https://i.stack.imgur.com/A6eFw.png
[JSON DATA] : https://i.stack.imgur.com/Vd9ww.png

Related

Kendo Grid Payload Difference

I have the exact same HTML as the example of a kendo grid but the payloads are completely different mine is:
Payload from My Kendo Grid
HTML:
My HTML
while the payload from the example is:
Payload from the Example Grid
Example HTML
I tried to add a contentType: "json" to the update function and the call was still broken.

make Angular app return pure JSON instead of Angular source

Is is it possible to return JSON (www.myapp.com/json) without any Angular additions on Angular page, like backend endpoint would return?
E.g this <pre>{{jsonToDisplay | json}}</pre> doesn't work, because when you look browser source you can see also Angular generated code.
You can add a json pipeline to transform data directly in the html as yo are doing, rememeber to import CommonModule 1.
If it does't work, you could implement a custom pipeline.

How to bind html from JSON API in Angular 8

i am trying to display data from API in Angular 8 But this API include a html code
and when i try to show it in the page the html show up without working
Like this
i am wondering how can i compile the html to look like it supposed to be
This is answered here:
Angular HTML binding
You can use either this:
<div [innerHTML]="current_page.data.details"></div>
or <div innerHTML="{{current_page.data.details}}"></div>
Check the reference: https://angular.io/guide/template-syntax#property-binding-vs-interpolation

How to populate a jquery grid using Knockout JS in MVC 4

I'm new to ASP.NET MVC and Knockout JS. I have a project requirement as below.
I should have a List<> in a ViewModel which is the data for my grid.
I need to pass that List's data from the Controller to the
view through a $.ajax() method.
The data coming from the controller should be in JSON format.
I should use Knockout JS for data-binding in my view.
Please, can anybody help me to do this task with an example or provide me some web links for the demo.
About returning JSON, ASP.Net WebAPI should be you best bet. Some samples here : http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
KO Grid could help you doing that on the front-end side. There's some sample here to get you started : http://knockout-contrib.github.io/KoGrid/#/overview
I think that's actually the only things you'll need to get you started!

JSON output in Umbraco 5

I just switched from Umbraco 4 to Umbraco 5 and it seems like a lot has changed.
So what i basically want is a possibility to add a alternative template to my document-types.
The fall back template shall return the content as JSON.
Why, you say? I want to create an API-like way of accessing the Umbraco data from my mobile devices.
WebAPI (http://cultiv.nl/blog/2012/4/22/exposing-umbraco-5-content-through-the-aspnet-web-api/)
I have thought about using WebAPI from asp.net MVC 4, but the project is really just a proof of concept and i don't want to code each endpoint.
So i found a som guys that did a package for Umbraco 4 that actually does this and renders the content of #currentPage as Json. The template is hit by adding "/JSON" to the end of the url. Unfortunetly this uses xslt, which ihas been removed from Ubraco 5.1 (Good thing).
So. I bet it's simple to create a partial, a macro or a partial macro that does this and add it to a template. But is just cant figure out where to start.
Any help with that? What I'm looking for is a step guide on what steps to take, to make the setup. Rendering the stuff ad json in C# i can handle.
It's the integration into Umbraci I lack.
Hoe u can help.
The alternative templating works exactly like in v4: Just add the name of the template at the end of the url: yoururl/json
Then add a new razor view to the templates named "json" with the following code:
#inherits RenderViewPage
#using System.Web.Mvc.Html;
#using Umbraco.Cms.Web;
#{
Layout = "";
}
{
#foreach (var attribute in Model.Attributes)
{
string.Format("\"{0}\": \"{1}\"", attribute.AttributeDefinition.Alias, attribute.DynamicValue);
}
}
This code can be used as a starting point without using the web api or own controllers.
Don't forget to allow the tempplate on all document types
hth,
Thomas