0

I want to bind an id from my datasource to each li element for a PanelBar so I can use this id later to expand a given node.
Is this possible?

NKnusperer
  • 974
  • 1
  • 11
  • 31

1 Answers1

0

I havent worked with panelbar but this is coming from a grid. You can get access to values off the Model by using '#=Name #'. It seems that it needs '' if it is calling a JS function

columns.Bound(m => m.OwnerName).Title("Owner Name")
.ClientTemplate("<a href='javascript: void(0);' onclick=\"return 
openMSDynamicsWindow('#= OwnerUrl #');\">#= OwnerName #</a>");

Here's the Javascript that was generated, not sure how it would work. I don't understand why those numbers are added into places

{"columns":[{"title":"Subsys #",
"template":"\u003ca href=\u0027javascript: void(0);\u0027 onclick=\"return   str(\u0027mystring\u0027);\"\u003e#= Name #\u003c/a\u003e",

"field":"Subsys","filterable":{},"encoded":true},
CSharper
  • 5,420
  • 6
  • 28
  • 54