Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Give me code as soon as possible
Posted

@model IEnumerable<dmart.categorydetailsmaster>

<script src="~/Scripts/jquery-1.8.2.js"></script>
<script src="~/Scripts/jquery-1.8.2.min.js"></script>


@Html.DisplayNameFor(model => model.CategoryName)
@foreach (var item in Model)
{

<input type="checkbox" id="catAll"/>
@Html.DisplayFor(modelItem => item.CategoryName)




}
<script type="text/javascript">
$(document).ready(function(){

$("[.treename] input[type=checkbox]").bind("click", function () {
var $this = $(this)
if($this.next().length > 0 && $this.next()[0].tagName == "DIV")
{
var isChecked = $(this).is(":checked");
if(isChecked)
{
$(this).attr("checked", "checked");
}
else {
$(this).removeAttr("checked");
}
}
});
});
</script>




SQL
you can use above code to start your tree view...
 
Share this answer
 
v2
Thank You So Much h h h Dear Nandu Nair ......
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900