<div class="col-lg-3 col-md-6"><span class="txt">Select The group To be assigned </span><div style="display: inline-block;">@Html.EJ().TreeView("tree").TreeViewFields(s => s.Datasource((IEnumerable<Models.Visual.VisualGroup>)ViewBag.groupsSource).Id("id").ParentId("parentId").Text("name").HasChild("hasChild")).ShowCheckbox(true).EnablePersistence(true).EnableRTL(true).LoadOnDemand(true).ClientSideEvents(e => e.NodeCheck("onItemSelectGroups")).ClientSideEvents(e => e.NodeUncheck("onItemSelectGroups"))</div></div><div class="col-lg-3 col-md-6"><span class="txt">and/or the specific Individual.</span>@Html.EJ().TreeView("tree2").TreeViewFields(s => s.Datasource((IEnumerable<Models.Visual.VisualGroup>)ViewBag.groupsIndividualSource).Id("id").ParentId("parentId").Text("name").HasChild("hasChild")).ShowCheckbox(true).EnablePersistence(true).EnableRTL(true).LoadOnDemand(true).ClientSideEvents(e => e.NodeCheck("onItemSelectGroups")).ClientSideEvents(e => e.NodeUncheck("onItemSelectGroups"))</div>
<script type="text/javascript">function onItemSelectGroups(args) {console.log('onItemSelectGroups ' + args);//do something}</script>
[JAVASCRIPT]
function screen1Check(args){
console.log("Screen1 Element Checked");
}
function screen1UnCheck(args) {
console.log("Screen1 Element UnChecked");
}
var treeObj = $("#tree").ejTreeView("instance");
treeObj.option({ "nodeCheck": “screen1Check”, "nodeUncheck": “screen1UnCheck” }); |