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
};
});