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?
Asked
Active
Viewed 741 times
0

NKnusperer
- 974
- 1
- 11
- 31
1 Answers
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
-
I just use the opensource version and not the commercial wrapper, can you please tell me how this is translated into JS ? – NKnusperer Mar 13 '14 at 23:01
-
I posted the JS that renders above, not sure what you would need to code – CSharper Mar 14 '14 at 13:07