Toolbar

I’m working with the toolbar and am trying to populate the currently logged in user @HttpContext.Current.User.Identity from the server. I’ve tried several methods but it populates slower than the toolbar which gives me an undefined or blank.

What is the best solution for this? Currently I am trying to do a web api query similar to populating the gridview but it doesn’t work at all.

        view: "toolbar",

        elements: [
            { view: "label", label: "<a href='https://mycompany.com'><img class='photo' src='assets/imgs/logo_white.svg' /></a>", width: 200 },
            {
                height: 46,
                id: "person_template",
                css: "header_person",
                borderless: true,
                width: 180,
                data: user.getAll,


define([], function () {

    var data = [
        { "id": 1, "name": "John Doe" }
    ];

    return {
        getAll: data
    };

});

Hello,

is “person_template” Template view ? You need to define “template” property for it. For example:

id: "person_template",
template:"#name#",
data: { "id": 1, "name": "John Doe" }

Yes but I am trying to get the data from the server to populate it. Having it in the same JS file doesn’t work as it won’t populate the @HttpContext.Current.User.Identity. So I am trying to setup a server query like shown above. Do you have an example of how that would work?

Template view supports “url” property and load method http://docs.webix.com/api__refs__ui.template.html

id: "person_template",
template:"#name#",
url: "data.json"