<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MVCControlsToolkit Discussions Rss Feed</title><link>http://mvccontrolstoolkit.codeplex.com/discussions</link><description>MVCControlsToolkit Discussions Rss Description</description><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;The limit of Web applications are due to the standards they must conform to.&lt;br /&gt;
&lt;br /&gt;
For instance, returning to the sub-classing problem ALL Client Block Mvc Controls Toolkit controls, like the &amp;quot;client repeater&amp;quot; are able to handle several templates, so you may display different subclasses in different ways, if you have a way to recognize an object belong to a certain class (javascript has no type associated to an object, so you have to check, for instance the existence of a property).&lt;br /&gt;
&lt;br /&gt;
HOWEVER the problem is with the serializer/deserializer that transform data from ad to jSon. It is not able to understand a json data structure represent a sub-class of the main class it is processing. Now this is not a technical problem, but just a matter of standards...json has no way to convey the sub-class information...according to the standards.&lt;br /&gt;
&lt;br /&gt;
However, you may customize one of the existing serializers, by adding the type information to the json object (for instance a _type property)....However, if for some reason you want to use a different serializer...then your code will not run with the new serializer, because your modification doesn't conform to any standard.&lt;br /&gt;
&lt;br /&gt;
For future projects give a look to the &lt;a href="http://www.dotnet-programming.com/page/Data-Moving-Plug-in-Main-Features.aspx" rel="nofollow"&gt;Data-Moving plugin&lt;/a&gt; for the Mvc Controls Toolkit, it has a lot of out of the box controls you may configure easily with a fluent interface. The RTM has been closed and we are preparing the documentation. It will be availble in a short time.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Wed, 22 May 2013 07:57:52 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130522075752A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Yeah I didn't know you couldn't do it&lt;br /&gt;
&lt;br /&gt;
So to do something like this work I need to make EVERY item bound to client blocks?&lt;br /&gt;
Like those &amp;quot;client templates&amp;quot; and &amp;quot;client repeaters&amp;quot; and stuff (I just skimmed over)?&lt;br /&gt;
&lt;br /&gt;
Yeah I don't have time to study those, I'll see if I find a way to do this on the server (like a wizard or something) and after this project is done I'll try studying this toolkit more deeply (it's still unbelievable cool)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don't really believe something like this should be &amp;quot;complex&amp;quot; to do client side. &lt;br /&gt;
Yes, it's more complex than the usual &amp;quot;1 class model&amp;quot;, but there should be an easy way to customize any type of model and manipulate it client-side (like with client blocks, knockout, etc), specially models with heritance, which in my mind are very common or at least in my experience.&lt;br /&gt;
Basically, if you can do it easily on WPF or Silverlight, etc, you should be able to do it easily in MVC (or without much more effort).&lt;br /&gt;
I don't see that happening with web applications and it makes me sad :(&lt;br /&gt;
&lt;br /&gt;
Well, thanks for the advice!&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Tue, 21 May 2013 20:07:56 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130521080756P</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;The point is that you are trying to do complex suffs without having first adquired experience and manuality on simple examples before. The learning time of all Mvc related stuffs is higher than that of the corresponding WebForms. However, Mvc is more flexible. Try to concentrate on each simple example without mixing several techniques in same part of the page. Once you have something working, and you have understood well how all stuffs work you may add more, and more complexity&lt;br /&gt;
&lt;br /&gt;
1) When you pass several templates to the sortable list helper, they must be included into an array of templates, and each template is contained within a _S.H(....), while you put all Html templates one after the other. Please give a look to the multiple template example &lt;a href="https://mvccontrolstoolkit.codeplex.com/wikipage?title=SortableListFor" rel="nofollow"&gt;here&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
2) You must have several add buttons each for each different template. Each of the add button helper nust contain the index of the template it must use when creating the new element(the index in the array of all templates)&lt;br /&gt;
&lt;br /&gt;
3) you can't mix client blocks with server controls items controls. You may use both server controls and client blocks in the same page, but you can't nest them. Look at the &lt;a href="https://mvccontrolstoolkit.codeplex.com/documentation" rel="nofollow"&gt;documentation index&lt;/a&gt;. Items controls are listed into two separate classes: the one that work with client block, and the one that are pure server controls. &lt;br /&gt;
&lt;br /&gt;
4) Client Blocks can't handle sub-classes (like in the heterogegenous list example) becau e the json desrializer has no information on which subclass to use when it deserialize json data (json data contai no type information).&lt;br /&gt;
&lt;br /&gt;
As a conclusion if you want to mix sub-types  you cant use client blocks, so you have to use a sortablelistfor helper...but passin the right templates&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Tue, 21 May 2013 13:02:09 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130521010209P</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;When I run that, every time I hit the SortableList button to add a new line, I get this error:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Uncaught Error: Unable to parse bindings.&lt;br /&gt;
Message: ReferenceError: addNewItem is not defined;&lt;br /&gt;
Bindings value: click: addNewItem &amp;quot;&lt;br /&gt;
&lt;br /&gt;
If I load a line before passing it to the view (by initializing a new subclass in the constructor of the model of this view (and calling said constructor before passing it to the view), I can work with it, using both the SelectButtons and the Client Block perfectly&lt;br /&gt;
But when adding a new line it shows ALL the different templates for each subclass (instead of 1 and having the other ones hidden) and throws that error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
About my 2nd approach, I tried doing it on my actual project.&lt;br /&gt;
At first it works alright, the first time I go to the view. It binds attributes alright.&lt;br /&gt;
However, when I try testing server side validation (basically try passing &amp;quot;bad&amp;quot; parameters), it breaks.&lt;br /&gt;
&lt;br /&gt;
The first time it does validation it does it perfectly...for the most part.&lt;br /&gt;
Before doing the initial POST, I fiddle around with the SelectButtons, adding new values, then changing the subclass, adding other attributes, forcing &amp;quot;bad&amp;quot; values (that will fail the validation), etc&lt;br /&gt;
When the 1st POST arrives at the controller, it does all [Required] and &amp;quot;normal&amp;quot; validation correctly&lt;br /&gt;
However I tried a &amp;quot;complex&amp;quot; validation (over the list of all subclasses, the part with &amp;quot;&lt;a href="mailto:@Html.ValidationMessageFor(m" rel="nofollow"&gt;@Html.ValidationMessageFor(m&lt;/a&gt; =&amp;gt; m.Tipos)&amp;quot;), and one time it didn't validate it, and at another time it did (when it should have validated them both...as in they were both wrong and it should have showed up in the ModelState).&lt;br /&gt;
&lt;br /&gt;
Itt throws A LOT of &amp;quot;NullReferenceException&amp;quot; in this part:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Texto&amp;quot;, &amp;quot;insertTexto&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;TextoSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;&lt;/code&gt;&lt;/pre&gt;

Not only that, but when I get the model back to the view, show the validation and let the user edit it, if I make changes to it (for instance use the SelectButtons to choose a new subclass where the error happened), or add a new subclass (with the SortedList button), or stuff like that, either the model binder makes the whole model null (when passing it to the controller), or it makes some of the parameters null when they actually weren't&lt;br /&gt;
&lt;br /&gt;
The whole thing is too chaotic, at times it works and at times it doesn't, at times some validation works and at times it doesnt, all the while the NullReferenceException keeps being triggered, etc.&lt;br /&gt;
&lt;br /&gt;
I even tried this new &amp;quot;fix&amp;quot; (initializing SelectedItems in ComboboxViewModel) and see if it worked with that, but instead of showing the ComboBoxViewModel template it shows the literal string &amp;quot;{v@{var bindings = Html.ClientBindings(); bindings .AddMethod(&amp;quot;addNewItem&amp;quot;,...&amp;quot; (that is inside the template)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm totally lost right now so I don't even know what to ask of you.&lt;br /&gt;
You are the lead developer so you shouldn't dwell with every single &amp;quot;technical support&amp;quot; problem ever either.&lt;br /&gt;
&lt;br /&gt;
I just want to know if you can recommend a way for me to do this (Editable list of subclasses+Client Block+Validation+Free modifiable values after validation fails) in a simple way if possible without the need of too much configuration or things that could go wrong.&lt;br /&gt;
Do you know of any example of something like this? Maybe just imitating the code a little bit of something that actually works may be better than try it on my own, specially since I need to solve this quickly for my project :(&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sorry for the unending list of problems, errors and stuff &amp;gt;_&amp;gt;&lt;br /&gt;
The thing is that I tried for weeks to do this and couldn't find a single way to do so.&lt;br /&gt;
I tried normal MVC, and it was impossible to work (no &amp;quot;client-side&amp;quot; way to manipulate the subclasses and stuff)&lt;br /&gt;
I tried Knockout MVC and it didn't work either (had lots of problems and I couldn't fix them)&lt;br /&gt;
I tried using knockout.js directly, but it was impossible for me to map the subclasses and stuff to a javascript object, bind it and make it work&lt;br /&gt;
&lt;br /&gt;
This is the first one that I think may actually work, so I really need it to :/&lt;br /&gt;
&lt;br /&gt;
I can't believe it's so hard to do something like this in MVC &amp;gt;_&amp;gt;&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Tue, 21 May 2013 01:22:26 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130521012226A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;You are right I hadn't initialized SelectedItem, thanks!&lt;br /&gt;
&lt;br /&gt;
Yet....&lt;br /&gt;
&lt;br /&gt;
I'm sorry that I'm bothering you this much, but I new to your toolkit and it's a little hard to use at times :(&lt;br /&gt;
&lt;br /&gt;
I have some new problems.&lt;br /&gt;
&lt;br /&gt;
First I'll try setting some context.&lt;br /&gt;
I want to basically combine the &amp;quot;Heterogenous list with subclasses&amp;quot; example with the &amp;quot;Client box with inline transformations&amp;quot; example&lt;br /&gt;
I want a variable and editable list of different subclasses that belong to a specific superclass, and one of those specific subclasses uses a Client Box to edit a &amp;quot;List&amp;lt;string&amp;gt;&amp;quot; property of it (the above &amp;quot;combobox&amp;quot; type).&lt;br /&gt;
I want this to be posted in a form, and be validated.&lt;br /&gt;
Each type is validated in different ways, etc.&lt;br /&gt;
&lt;br /&gt;
I tried doing 2 approaches to this:&lt;br /&gt;
&lt;br /&gt;
1) Do a &amp;quot;mock project&amp;quot; (the above one) to test the Client Block for ComboBox&lt;br /&gt;
&lt;br /&gt;
2)Ignore the ComboBox subclass (basically remove it, or at least remove the &amp;quot;List&amp;lt;string&amp;gt;&amp;quot; property that needs the Client Box) and try to see if it works that way.&lt;br /&gt;
&lt;br /&gt;
I encountered problems in each, and I'm not sure exactly how to handle it.&lt;br /&gt;
&lt;br /&gt;
In (1) this is basically the code:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;@using (Html.BeginForm(&amp;quot;BO_CrearSitioTest&amp;quot;, &amp;quot;BackOffice&amp;quot;))
{

@Html.ValidationSummary(true)
&amp;lt;div&amp;gt;
&amp;lt;!-- bunch of unrelated properties of the model --&amp;gt;
&amp;lt;/div&amp;gt;    
&amp;lt;div&amp;gt; 
    @Html.LabelFor(m =&amp;gt; m.Tipos)
    @Html.ValidationMessageFor(m =&amp;gt; m.Tipos)

@Html.SortableListFor(m =&amp;gt; m.Tipos, 
        _S.H&amp;lt;TipoAtributoModel&amp;gt;(        
         @&amp;lt;text&amp;gt;

           @{HtmlHelper&amp;lt;BooleanoModel&amp;gt; hBooleano;
           HtmlHelper&amp;lt;EnteroModel&amp;gt; hEntero;
           HtmlHelper&amp;lt;ComboBoxModel&amp;gt; hComboBox;
           HtmlHelper&amp;lt;FechaModel&amp;gt; hFecha;
           HtmlHelper&amp;lt;RealModel&amp;gt; hReal;
           HtmlHelper&amp;lt;TextoModel&amp;gt; hTexto;}
                
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Booleano&amp;quot;, &amp;quot;insertBooleano&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;BooleanoSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Entero&amp;quot;, &amp;quot;insertEntero&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;EnteroSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;ComboBox&amp;quot;, &amp;quot;insertComboBox&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;ComboBoxSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Fecha&amp;quot;, &amp;quot;insertFecha&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;FechaSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Real&amp;quot;, &amp;quot;insertReal&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;RealSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;strong&amp;gt;@item.SelectionButton(&amp;quot;Texto&amp;quot;, &amp;quot;insertTexto&amp;quot;, item.PrefixedId(&amp;quot;attributeType&amp;quot;), item.PrefixedId(&amp;quot;TextoSelection&amp;quot;), ManipulationButtonStyle.Link)&amp;lt;/strong&amp;gt;
        &amp;lt;!-- Este es el template para el tipo Booleano --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertBooleano&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
            @item.DescendatntCast(m =&amp;gt; m).To(out hBooleano)
            &amp;lt;div&amp;gt;
                @hBooleano.LabelFor(m =&amp;gt; m.Nombre) 
                @hBooleano.TextBoxFor(m =&amp;gt; m.Nombre) 
                @hBooleano.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hBooleano.LabelFor(m =&amp;gt; m.Requerido) 
                @hBooleano.CheckBoxFor(m =&amp;gt; m.Requerido) 
                @hBooleano.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;!-- Este es el template para el tipo Entero --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertEntero&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
        @item.DescendatntCast(m =&amp;gt; m).To(out hEntero)
            &amp;lt;div&amp;gt;
                @hEntero.LabelFor(m =&amp;gt; m.Nombre)
                @hEntero.TextBoxFor(m =&amp;gt; m.Nombre)
                @hEntero.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hEntero.LabelFor(m =&amp;gt; m.Requerido)
                @hEntero.CheckBoxFor(m =&amp;gt; m.Requerido)
                @hEntero.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hEntero.LabelFor(m =&amp;gt; m.RangoInicio)
                @hEntero.TextBoxFor(m =&amp;gt; m.RangoInicio)
                @hEntero.ValidationMessageFor(m =&amp;gt; m.RangoInicio)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hEntero.LabelFor(m =&amp;gt; m.RangoFin)
                @hEntero.TextBoxFor(m =&amp;gt; m.RangoFin)
                @hEntero.ValidationMessageFor(m =&amp;gt; m.RangoFin)
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

         &amp;lt;!-- Este es el template para el tipo ComboBox --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertComboBox&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
        @item.DescendatntCast(m =&amp;gt; m).To(out hComboBox)
            &amp;lt;div&amp;gt;
                @hComboBox.LabelFor(m =&amp;gt; m.Nombre)
                @hComboBox.TextBoxFor(m =&amp;gt; m.Nombre)
                @hComboBox.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hComboBox.LabelFor(m =&amp;gt; m.Requerido)
                @hComboBox.CheckBoxFor(m =&amp;gt; m.Requerido)
                @hComboBox.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
            
            &amp;lt;div id=&amp;quot;ComboBoxViewModelContainer&amp;quot;&amp;gt;
            {
                var comboBoxValoresHelper =
                  hComboBox.TransformedHelper(
                      m =&amp;gt; m.PosiblesValores,
                      new ComboBoxViewModel());
                      }
                hComboBox.ValidationMessageFor(m =&amp;gt; m.PosiblesValores)
                comboBoxValoresHelper.TemplateFor(m =&amp;gt; m, &amp;quot;Template/ComboBoxViewModelTemplate&amp;quot;, null, true, &amp;quot;valoresHandling&amp;quot;, &amp;quot;ComboBoxModelContainer&amp;quot;, true)
           
            &amp;lt;/div&amp;gt; 
        &amp;lt;/div&amp;gt;

        &amp;lt;!-- Este es el template para el tipo Fecha --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertFecha&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
        @item.DescendatntCast(m =&amp;gt; m).To(out hFecha)
            &amp;lt;div&amp;gt;
                @hFecha.LabelFor(m =&amp;gt; m.Nombre)
                @hFecha.TextBoxFor(m =&amp;gt; m.Nombre)
                @hFecha.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hFecha.LabelFor(m =&amp;gt; m.Requerido)
                @hFecha.CheckBoxFor(m =&amp;gt; m.Requerido)
                @hFecha.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hFecha.LabelFor(m =&amp;gt; m.Formato)
                @hFecha.TextBoxFor(m =&amp;gt; m.Formato)
                @hFecha.ValidationMessageFor(m =&amp;gt; m.Formato)
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;!-- Este es el template para el tipo Real --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertReal&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
        @item.DescendatntCast(m =&amp;gt; m).To(out hReal)
            &amp;lt;div&amp;gt;
                @hReal.LabelFor(m =&amp;gt; m.Nombre)
                @hReal.TextBoxFor(m =&amp;gt; m.Nombre)
                @hReal.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hReal.LabelFor(m =&amp;gt; m.Requerido)
                @hReal.CheckBoxFor(m =&amp;gt; m.Requerido)
                @hReal.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hReal.LabelFor(m =&amp;gt; m.RangoInicio)
                @hReal.TextBoxFor(m =&amp;gt; m.RangoInicio)
                @hReal.ValidationMessageFor(m =&amp;gt; m.RangoInicio)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hReal.LabelFor(m =&amp;gt; m.RangoFin)
                @hReal.TextBoxFor(m =&amp;gt; m.RangoFin)
                @hReal.ValidationMessageFor(m =&amp;gt; m.RangoFin)
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;


        &amp;lt;!-- Este es el template para el tipo Texto --&amp;gt;
        &amp;lt;div id='@item.PrefixedId(&amp;quot;insertTexto&amp;quot;)' class='AttributeListItem @item.PrefixedId(&amp;quot;attributeType&amp;quot;)'&amp;gt;
        @item.DescendatntCast(m =&amp;gt; m).To(out hTexto)
            &amp;lt;div&amp;gt;
                @hTexto.LabelFor(m =&amp;gt; m.Nombre)
                @hTexto.TextBoxFor(m =&amp;gt; m.Nombre)
                @hTexto.ValidationMessageFor(m =&amp;gt; m.Nombre)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hTexto.LabelFor(m =&amp;gt; m.Requerido)
                @hTexto.CheckBoxFor(m =&amp;gt; m.Requerido)
                @hTexto.ValidationMessageFor(m =&amp;gt; m.Requerido)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hTexto.LabelFor(m =&amp;gt; m.TamMinimo)
                @hTexto.TextBoxFor(m =&amp;gt; m.TamMinimo)
                @hTexto.ValidationMessageFor(m =&amp;gt; m.TamMinimo)
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                @hTexto.LabelFor(m =&amp;gt; m.TamMaximo)
                @hTexto.TextBoxFor(m =&amp;gt; m.TamMaximo)
                @hTexto.ValidationMessageFor(m =&amp;gt; m.TamMaximo)
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt; 
        @item.ViewList(item.PrefixedId(&amp;quot;attributeType&amp;quot;), &amp;quot;attributeSelected&amp;quot;, &amp;quot;insertTexto&amp;quot;)
    
    @item.SortableListDeleteButton(&amp;quot;Borrar Tipo&amp;quot;, ManipulationButtonStyle.Link)
    &amp;lt;/text&amp;gt;
        ),
        htmlAttributesItems: new Dictionary&amp;lt;string, object&amp;gt;{{&amp;quot;class&amp;quot;, &amp;quot;AtributoListItem&amp;quot;}},
         itemContainer: ExternalContainerType.div,
         allItemsContainer: ExternalContainerType.div,
         canSort: false
         )

 &amp;lt;/div&amp;gt;   
  &amp;lt;div class='ControlPanel'&amp;gt;
 @Html.SortableListAddButtonFor(m =&amp;gt; m.Tipos, &amp;quot;Agregar Tipo&amp;quot;) &amp;lt;input type='submit' value='Crear Sitio' /&amp;gt;
 &amp;lt;/div&amp;gt;
}

@section Scripts{   
    @Scripts.Render(&amp;quot;~/Scripts/MVCControlToolkit.Controls-2.4.0.js&amp;quot;)     
    @Scripts.Render(&amp;quot;~/Scripts/knockout.all-2.4.0.min.js&amp;quot;)        
    @Scripts.Render(&amp;quot;~/Scripts/MvcControlToolkit.Utils-2.4.0.js&amp;quot;)   
}&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>gonzaw</author><pubDate>Tue, 21 May 2013 00:49:11 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130521124911A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;The message Message: TypeError: Cannot read property 'length' of null; &lt;br /&gt;
&lt;br /&gt;
make sense...something good is happening...but something is null.&lt;br /&gt;
&lt;br /&gt;
Normally we have this problem when an IEnumerable that must me transferred to the client viewmodel is null. In this casse the knockout mapping  function that creates automatically observables, is not able to understand it is an IEnumerable...so it doesnt create an observableArray....and this creates problem when you try to bind this property to something that requires an observableArray.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I suspect your SelectedItems are null.... NEVER leave IEnumerables properties null, always put an empty IEnumerable in them, so an empty array is created when the value is transformed into javascript....so knockout is able to understand it must create an observableArray.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Mon, 20 May 2013 20:33:34 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130520083334P</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Yeah I tried to test a little bit the order and includes of the scripts, but no one worked.&lt;br /&gt;
&lt;br /&gt;
If I put it &amp;quot;correctly&amp;quot; like this (took out the duplicates):&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;@Scripts.Render(&amp;quot;~/Scripts/MVCControlToolkit.Controls-2.4.0.js&amp;quot;)     
@Scripts.Render(&amp;quot;~/Scripts/knockout.all-2.4.0.min.js&amp;quot;)    
@Scripts.Render(&amp;quot;~/Scripts/MvcControlToolkit.Utils-2.4.0.js&amp;quot;)&lt;/code&gt;&lt;/pre&gt;

It gives me this error:&lt;br /&gt;
&amp;quot;Uncaught Error: Unable to parse bindings.&lt;br /&gt;
Message: TypeError: Cannot read property 'length' of null;&lt;br /&gt;
Bindings value: click: removeSelected, enable: SelectedItems().length &amp;gt; 0&lt;br /&gt;
knockout.all-2.4.0.min.js:221 &amp;quot;&lt;br /&gt;
&lt;br /&gt;
If I put Bindings afterwards like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;@Scripts.Render(&amp;quot;~/Scripts/MVCControlToolkit.Controls-2.4.0.js&amp;quot;)     
@Scripts.Render(&amp;quot;~/Scripts/knockout.all-2.4.0.min.js&amp;quot;)    
@Scripts.Render(&amp;quot;~/Scripts/MvcControlToolkit.Bindings-2.4.0.js&amp;quot;)
@Scripts.Render(&amp;quot;~/Scripts/MvcControlToolkit.Utils-2.4.0.js&amp;quot;)&lt;/code&gt;&lt;/pre&gt;

It doesn't give me that error anymore, but gives me the &amp;quot;maximum call stack exceeded&amp;quot; error from before&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Mon, 20 May 2013 17:52:59 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130520055259P</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Actually the way you used all script includes is wrong. There are several errors:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;MVCControlToolkit.Controls.Core must be always the first include of all mvc Controls Toolkit files.&lt;/li&gt;
&lt;li&gt;MvcControlToolkit.Bindings-2.4.0.js is already included in knockout.all-2.4.0.min.js, so it must not be included again&lt;/li&gt;
&lt;li&gt;
MVCControlToolkit.Controls-2.4.0 contains MVCControlToolkit.Controls.Core, MVCControlToolkit.Controls.Items-2.4.0.js and other js, so it is a duplicate.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
Please refer to the &lt;a href="https://mvccontrolstoolkit.codeplex.com/wikipage?title=Which%20Javascript%20file%20to%20include" rel="nofollow"&gt;script include section&lt;/a&gt; to learno more about which js files to include.&lt;br /&gt;
&lt;br /&gt;
No the jQuery version doesnt matter. The only breaking difference is with jquery 1.9&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Mon, 20 May 2013 08:59:41 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130520085941A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Actually, this is false&lt;br /&gt;
&lt;br /&gt;
I'm doing this in a &amp;quot;testing project&amp;quot; to figure out how to do this exactly for my actual project&lt;br /&gt;
&lt;br /&gt;
In my actual project I have jquery-1.8.3 and jquery-1.7.2. I might try it in there, but I'd like to be sure it works in the &amp;quot;mock&amp;quot; project first. Hopefully the difference in jquery versions doesn't matter&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Mon, 20 May 2013 05:31:14 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130520053114A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;No, I'm using jquery-1.8.2.&lt;br /&gt;
I tried using the 2.4.1 release just in case but didn't work either.&lt;br /&gt;
&lt;br /&gt;
Yes, it might be something about the js libraries. I'm not exactly sure which ones to use (which versions, etc),&lt;br /&gt;
Anyways, here are my views:&lt;br /&gt;
&lt;br /&gt;
Layout.cshtml&lt;br /&gt;
&lt;pre&gt;&lt;code&gt; @Scripts.Render(&amp;quot;~/bundles/modernizr&amp;quot;)
@Scripts.Render(&amp;quot;~/Scripts/jquery-1.8.2.js&amp;quot;)
@RenderSection(&amp;quot;scripts&amp;quot;, required: false)&lt;/code&gt;&lt;/pre&gt;

ComboboxTest.cshtml&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;@using CrearSitio.Models
@model ComboBoxModel

@{
    ViewBag.Title = &amp;quot;ComboboxTest&amp;quot;;
    Layout = &amp;quot;~/Views/Shared/_Layout.cshtml&amp;quot;;
}

&amp;lt;h2&amp;gt;ComboboxTest&amp;lt;/h2&amp;gt;

 &amp;lt;div&amp;gt;
    @Html.LabelFor(m =&amp;gt; m.Nombre)
    @Html.EditorFor(m =&amp;gt; m.Nombre)
    @Html.ValidationMessageFor(m =&amp;gt; m.Nombre)
    @Html.LabelFor(m =&amp;gt; m.Requerido)
    @Html.CheckBoxFor(m =&amp;gt; m.Requerido)
    @Html.ValidationMessageFor(m=&amp;gt;m.Requerido)

&amp;lt;/div&amp;gt;

    @Html.ValidationMessageFor(m=&amp;gt;m.PosiblesValores)
    &amp;lt;div id=&amp;quot;ComboBoxViewModelContainer&amp;quot;&amp;gt;
            @{
                var comboBoxValoresHelper =
                  Html.TransformedHelper(
                      m =&amp;gt; m.PosiblesValores,
                      new ComboBoxViewModel());
                      }
                @Html.ValidationMessageFor(m =&amp;gt; m.PosiblesValores)
 @comboBoxValoresHelper.TemplateFor(m =&amp;gt; m, &amp;quot;Template/ComboBoxViewModelTemplate&amp;quot;, null, true, &amp;quot;valoresHandling&amp;quot;, &amp;quot;ComboBoxModelContainer&amp;quot;, true)           
&amp;lt;/div&amp;gt;

@section Scripts{
    &amp;lt;script src=&amp;quot;~/Scripts/jquery.validate.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;~/Scripts/jquery.validate.unobtrusive.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;   
    &amp;lt;script src=&amp;quot;~/Scripts/knockout.all-2.4.0.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;~/Scripts/MvcControlToolkit.Bindings-2.4.0.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;~/Scripts/MvcControlToolkit.Utils-2.4.0.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;~/Scripts/MVCControlToolkit.Controls.Core-2.4.0.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src=&amp;quot;~/Scripts/MVCControlToolkit.Controls.Items-2.4.0.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;        
    &amp;lt;script src=&amp;quot;~/Scripts/MVCControlToolkit.Controls-2.4.0.js&amp;quot;  type='text/javascript' &amp;gt;&amp;lt;/script&amp;gt;
  }&lt;/code&gt;&lt;/pre&gt;

ComboBoxViewModelTemplate.cshtml&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;@using CrearSitio.Models
@using MVCControlsToolkit.Controls.Bindings
@model ComboBoxViewModel


@{var bindings = Html.ClientBindings();
            bindings
                .AddMethod(&amp;quot;addNewItem&amp;quot;,
                @&amp;quot;
                    function () {&amp;quot;+
                        bindings.VerifyFieldsValid (m =&amp;gt; m.ItemToAdd) + @&amp;quot;
                        if (this.ItemToAdd() == null || this.ItemToAdd().length == 0) return;
                        this.PosiblesValores.push(this.ItemToAdd());
                        this.SelectedItems.push(this.ItemToAdd());
                        this.ItemToAdd('');  
                    }
                    &amp;quot;)
                .AddMethod(&amp;quot;removeSelected&amp;quot;,
                @&amp;quot;
                    function () {
                        this.PosiblesValores.removeAll(this.SelectedItems());
                        this.SelectedItems([]); // Reset selection to an empty set
                    }

                    &amp;quot;);
            }
            &amp;lt;div&amp;gt;
            @Html.LabelFor(m =&amp;gt; m.SelectedItems)
            @Html.DropDownListFor(m =&amp;gt; m.SelectedItems, new {style=&amp;quot;min-width:100px&amp;quot;}, Html.CreateChoiceList(
                m =&amp;gt; m.PosiblesValores,
                m =&amp;gt; m,
                m =&amp;gt; m, overridePrompt: &amp;quot;prova&amp;quot;))
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
                
               @Html.LabelFor(m =&amp;gt; m.ItemToAdd)
               @Html.TypedTextBoxFor(
                    m =&amp;gt; m.ItemToAdd, 
                    &amp;quot;watermark&amp;quot;)
                
                @Html.ValidationMessageFor(m =&amp;gt; m.ItemToAdd, &amp;quot;*&amp;quot;)
                @{
                var addButtonBindings = bindings
                    .Click(m =&amp;gt; m, &amp;quot;addNewItem&amp;quot;)
                    .Get();
                var removeButtonBinding = bindings
                    .Click(m =&amp;gt; m, &amp;quot;removeSelected&amp;quot;)
                    .Enable(m =&amp;gt; m.SelectedItems, &amp;quot;{0}.length &amp;gt; 0&amp;quot;).Get();
                }
                &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Agregar&amp;quot; data-bind='@addButtonBindings'/&amp;gt;
                &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Remover seleccionados&amp;quot; data-bind='@removeButtonBinding'/&amp;gt;
            &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>gonzaw</author><pubDate>Sun, 19 May 2013 18:57:43 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130519065743P</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Are you using jquery 1.9 or better? Becuase the knockout included in knockout all 2.4.0 is not compatible with 1.9.1. You have to download the 2.4.1 release of the same file that is availaable in the &lt;a href="https://mvccontrolstoolkit.codeplex.com/releases/view/102417" rel="nofollow"&gt;download area&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If this doesnt solve your problem, please show your view, and all javascript files included. The problem is due to the fact that the knocout binding is not working properly, probably because the template engine has problems, and the Html created is wrong.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Sun, 19 May 2013 12:05:32 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130519120532P</guid></item><item><title>New Post: Remote Validation on Datagrids</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/443841</link><description>&lt;div style="line-height: normal;"&gt;Thanks for the response, I suspected as much. I have hacked the validation into a javascript function used to get some other information for the portfolio, so the error is now shown, although it doesn't use the built in validation. I'll give your solution a go next time I get the chance.&lt;br /&gt;
&lt;/div&gt;</description><author>NZCB</author><pubDate>Sun, 19 May 2013 07:18:50 GMT</pubDate><guid isPermaLink="false">New Post: Remote Validation on Datagrids 20130519071850A</guid></item><item><title>New Post: Unterminated call stack on Client Block</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444169</link><description>&lt;div style="line-height: normal;"&gt;Hi again&lt;br /&gt;
&lt;br /&gt;
For my project I need to use a droplist to allow the user to input a list of strings for my model.&lt;br /&gt;
&lt;br /&gt;
I decided to &amp;quot;copy&amp;quot; the &amp;quot;Client Block Complete Example&amp;quot; approach to do so, both with using the Client Block, the template and the inline transformation.&lt;br /&gt;
&lt;br /&gt;
To get a better hold of the actual code needed, I checked the &amp;quot;NestedModels&amp;quot; downloadable, and basically copied the code back to back, just changing the name of the properties the name of the model/view, the name of the global javascript variable, and nothing else at all.&lt;br /&gt;
&lt;br /&gt;
However when loading I get a &amp;quot;Maximum call stack size exceeded &amp;quot; error in 'knockout.all-2.4.0' like this:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;b.la&lt;br /&gt;
b.$&lt;br /&gt;
b.a.d&lt;br /&gt;
ko.bindingHandlers.options.update&lt;br /&gt;
ko.bindingHandlers.options.update&lt;br /&gt;
ko.bindingHandlers.options.update&lt;br /&gt;
....&amp;quot;&lt;br /&gt;
and so on and on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(sometimes it puts &amp;quot;{anonymous function}&amp;quot; instead of b.la and the like)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I tried debugging it but I couldn't find the problem, mostly because I don't know where to look.&lt;br /&gt;
&lt;br /&gt;
Is there anything that can cause that error that I missed? Or at least where can I look to debug said error?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From what I can imagine, the elements of the droplist are constantly being updated for some reason (and thus the options of the droplist are being updated as well), but the only way they can be updated is via the &amp;quot;addNewItem&amp;quot; method, so how can this method be called when the page is loaded and not when the button is pressed?&lt;br /&gt;
&lt;br /&gt;
I am using the MVC4ControlsToolkit library this time :P&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Sun, 19 May 2013 05:40:37 GMT</pubDate><guid isPermaLink="false">New Post: Unterminated call stack on Client Block 20130519054037A</guid></item><item><title>New Post: Can't find _S.H</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444120</link><description>&lt;div style="line-height: normal;"&gt;Yes, I had downloaded the Mvc2 version (didn't realize there was a Mvc 3-4 one)&lt;br /&gt;
&lt;br /&gt;
This solved the problem, thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Sun, 19 May 2013 00:12:43 GMT</pubDate><guid isPermaLink="false">New Post: Can't find _S.H 20130519121243A</guid></item><item><title>New Post: Can't find _S.H</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444120</link><description>&lt;div style="line-height: normal;"&gt;Maybe you downloaded the version that works with Mvc2. The _S.H method is only available for version greater or equal to mvc 3 since they use Razor ehlpers that are not available in Asp.net Mvc2.&lt;br /&gt;
&lt;br /&gt;
Please use either the Mvc3 or Mvc 4 version of the library. The Mvc2 version will be discontinued in a short time.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Sat, 18 May 2013 10:39:08 GMT</pubDate><guid isPermaLink="false">New Post: Can't find _S.H 20130518103908A</guid></item><item><title>New Post: Can't find _S.H</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/444120</link><description>&lt;div style="line-height: normal;"&gt;Hi&lt;br /&gt;
&lt;br /&gt;
I've just seen this project and it seems like the coolest thing ever and just the thing to solve my mvc problems! (so kudos on that)&lt;br /&gt;
&lt;br /&gt;
I followed the tutorials on using ViewList and SortableListFor for handling subclasses, and installed the toolkit using NuGet, but in the MvcControlsToolkit.Controls._S class I couldn't find the &amp;quot;H&amp;quot; method and thus my code wouldn't work.&lt;br /&gt;
&lt;br /&gt;
I tried getting the .dll alone (from the binaries), but I couldn't find it in it either.&lt;br /&gt;
&lt;br /&gt;
I'd like to know if there is something I've been doing wrong&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;/div&gt;</description><author>gonzaw</author><pubDate>Sat, 18 May 2013 07:24:46 GMT</pubDate><guid isPermaLink="false">New Post: Can't find _S.H 20130518072446A</guid></item><item><title>New Post: Remote Validation on Datagrids</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/443841</link><description>&lt;div style="line-height: normal;"&gt;It is a sell known problem. The remote attribute doesnt work with items from a list, exactly because the parameter inserted in the query string contains a prefix that depends on the position of the item in the list. In theory, one might think to define a custom model binder that doesn't consider this prefix, but what a similar model binder should do depend strongly on the specific situation(there might be nested objects, or nested lists), so it is difficult to provide an out-of-the-box solution. &lt;br /&gt;
The only &amp;quot;acceptable&amp;quot; way is using a dirty trick!&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Just take the value of the parameter from the Asp.net Request object. The Request object contains a dictionary with all parameters passed in the query string. Look for a key that ends with &amp;quot;.Portfolio&amp;quot; , and take the corresponding value.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Fri, 17 May 2013 06:21:39 GMT</pubDate><guid isPermaLink="false">New Post: Remote Validation on Datagrids 20130517062139A</guid></item><item><title>New Post: Remote Validation on Datagrids</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/443841</link><description>&lt;div style="line-height: normal;"&gt;Hi There,&lt;br /&gt;
&lt;br /&gt;
I'm having trouble with Remote client side validation of items in a datagrid. From what I can see Remote validation requires the property name on the ViewModel object and Form to be exactly the same as the parameter name in the Controller Action method.&lt;br /&gt;
&lt;br /&gt;
In a datagrid this is not possible as each property name takes on a MVCControlsToolkit suffix.&lt;br /&gt;
How do I make the Remote validation work?&lt;br /&gt;
&lt;br /&gt;
In my example below the AjaxValidatePortfolioExists method is actually called but the Portfolio parameter is null, presumably because the actual property on the form is PortfolioAllocations___0___Item_Value_Portfolio&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;E.g. Class
public class ViewModel.PortfolioAllocation {
   [Remote(&amp;quot;AjaxValidatePortfolioExists&amp;quot;, &amp;quot;Portfolio&amp;quot;)]
   public string Portfolio {get;set;}
}&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;Controller Action method:
[ActionAuthorise(Process = &amp;quot;GetPortfolio&amp;quot;)]
[HttpGet, System.Web.Mvc.OutputCache(NoStore = true, Duration = 0, VaryByParam = &amp;quot;*&amp;quot;)]
public JsonResult AjaxValidatePortfolioExists(string Portfolio)
{
    return Json(Portfolio==&amp;quot;abc&amp;quot;, JsonRequestBehavior.AllowGet);
}&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>NZCB</author><pubDate>Thu, 16 May 2013 05:22:38 GMT</pubDate><guid isPermaLink="false">New Post: Remote Validation on Datagrids 20130516052238A</guid></item><item><title>New Post: JS Function running before controls fully loaded</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/428439</link><description>&lt;div style="line-height: normal;"&gt;Hi There,&lt;br /&gt;
&lt;br /&gt;
Just re-reading this whilst researching something else. &lt;br /&gt;
Thanks for the info re the setTimeout, I didn't realise it worked like that.&lt;br /&gt;
&lt;/div&gt;</description><author>NZCB</author><pubDate>Tue, 14 May 2013 03:19:45 GMT</pubDate><guid isPermaLink="false">New Post: JS Function running before controls fully loaded 20130514031945A</guid></item><item><title>New Post: TreeView raises NullPointer Exception</title><link>http://mvccontrolstoolkit.codeplex.com/discussions/441249</link><description>&lt;div style="line-height: normal;"&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
We prepared a version that is able to work with both ICollection and ICollection&amp;lt;T&amp;gt; for the children...and it appears to work, though we have not done exaustive testing.&lt;br /&gt;
&lt;br /&gt;
We will release in a short time s bug fix 2.4.1 release, before releasing it I will send you a preliminary copy so you can test it in your environment.&lt;br /&gt;
&lt;/div&gt;</description><author>frankabbruzzese</author><pubDate>Tue, 23 Apr 2013 16:06:14 GMT</pubDate><guid isPermaLink="false">New Post: TreeView raises NullPointer Exception 20130423040614P</guid></item></channel></rss>