tag:blogger.com,1999:blog-125341290284114978.post7856407468127745859..comments2023-04-23T00:05:10.829-07:00Comments on Guy Ellis' Tech Blog: ASP.NET MVC with jQuery DynaTree plugin for CheckboxesGuy Ellishttp://www.blogger.com/profile/02574435376236977220noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-125341290284114978.post-68480322468467107362011-05-23T14:52:06.000-07:002011-05-23T14:52:06.000-07:00@chris sounds like you're not declaring the ob...@chris sounds like you're not declaring the object type that the view is using. Are you doing this in asp.net web forms or MVC. If the latter, which view engine are you using, forms or razor?<br />Basically at the top of the view (in MVC) you need to declare the object type for the Model so that the view knows what data type it's dealing with. In MVC this will be different depending on the view type you're using: Forms, Razor or other...guy ellisnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-91197491489333739222011-05-23T12:46:12.000-07:002011-05-23T12:46:12.000-07:00I could not get the view to work correctly... I ha...I could not get the view to work correctly... I had to cast "Model" as an object to remove the error I received. When I ran the site, I did not get a checklist tree... only an unordered list. Any idea what I'm missing?chris wnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-10658453758122909322010-05-11T09:45:37.000-07:002010-05-11T09:45:37.000-07:00So if a child node is selected then you want the p...So if a child node is selected then you want the parent to always be selected right?<br />Yes, I believe that's possible. I don't have any sample code to hand at the moment to test it with but when the select event is fired you can make sure that all the parents, grandparents of the node are checked or you can check them during that event. Also, when the event is fired you can check to see if any children are selected and if so prevent a box from being unchecked.guy ellisnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-76270235360161956072010-05-11T04:26:18.000-07:002010-05-11T04:26:18.000-07:00I am talking with reference to this example wwwend...I am talking with reference to this example wwwendt.de/.../samples.html Is there any way I can prevent unselecting when any child node is clickedmazharnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-52073210498749477052009-09-04T16:24:57.000-07:002009-09-04T16:24:57.000-07:00Guy,
I just have to say thanks for your Javascrip...Guy, <br />I just have to say thanks for your Javascript eval engine trick for C#, on "StackOverflow.com". All of the other JScript avenues didn't work under VS2008, but yours does. Thanks - You're a lifesaver.<br />Dirk <br />Re: "For anybody developing in C# on Silverlight here's a pretty neat trick that I've just discovered that allows evaluation of an expression by calling out to the Javascript engine:<br />double result = (double) HtmlPage.Window.Eval("15 + 35");"<br />------------------------------------------------------------------<br />(Note - I didn't see where else I could post this thanks, so I submitted as a comment to one of your other posts)Dirk Jeffersonnoreply@blogger.com