This question is locked. New answers and comments are not allowed.
Hi All,
While watching model load the page I can see the Id populate the Item value
but then when I go to check it alert("Selected - " + treeView().getItemValue(e.item));
I am only getting the Item text ( title )...( I need the Id as I am editiing the Title on the fly) .....
Am I doing something wrong ? and If not ....Is there a work around??
item.Value = unit.Id.ToString();
Regards Craig T.......
While watching model load the page I can see the Id populate the Item value
but then when I go to check it alert("Selected - " + treeView().getItemValue(e.item));
I am only getting the Item text ( title )...( I need the Id as I am editiing the Title on the fly) .....
Am I doing something wrong ? and If not ....Is there a work around??
item.Value = unit.Id.ToString();
.BindTo(Model.Units, mappings => |
{ |
mappings.For<XP.Models.CustomClasses.Unit>(binding => binding |
.ItemDataBound((item, unit) => |
{ |
item.Text = unit.Title; |
item.Value = unit.Id.ToString(); |
item.ImageUrl = "../../Images/unit32.png"; |
}) |
.Children(unit => unit.Lessons)); |
mappings.For<XP.Models.CustomClasses.Lesson>(binding => binding |
.ItemDataBound((item, lesson) => |
{ |
item.Text = lesson.Title; |
item.Value = lesson.Id.ToString(); |
item.ImageUrl = "../../Images/lesson32.png"; |
}) |
.Children(lesson => lesson.Sections)); |
mappings.For<XP.Models.CustomClasses.Section>(binding => binding |
.ItemDataBound((item, section) => |
{ |
item.Text = section.Title; |
item.Value = section.Id.ToString(); |
item.ImageUrl = "../../Images/section32.png"; |
}) |
.Children(section => null)); |
}).HtmlAttributes(new { @class = "t-group" }) |
Regards Craig T.......