this.FormPanel(ModelState)

  1. #1

    this.FormPanel(ModelState)

    I hope you can guide me.
    I'm returning my return action thus this.FormPanel (ModelState);
    which recovered the following information:

    I want to update the dataview with the information returned from errors


    {"success":false,"errors":[{"id":"FrecDescripcion","msg":"Por favor ingresar la Frecuencia"},{"id":"FrecHoraInicio","msg":"Por favor ingresar Hora Inicial"},{"id":"FrecHoraFinal","msg":"Por favor ingresar Hora Final"}]}

    X.DataView() 
                                    .StyleHtmlContent(true)                                 
                                    .ItemSelector("li")  
                                    .Store(
                                            X.ModelStateStore()                                        
                                            .ID("ModelStateStore1")
                                    )
                                    .Tpl(                                
                                            X.XTemplate()                                        
                                            .Html(
                                                @<text> 
                                                    <ul >
                                                        <tpl for=".">
                                                            <li style="color:red;">{error}</li>
                                                        </tpl>
                                                    </ul>
                                                    
                                                </text>
                                            )
                                    )
  2. #2
    Please see the following sample
    http://mvc.ext.net/#/Models/Model_State/

    You need to call the following code in controller action
    
    this.GetCmp<ModelStateStore>("ModelStateStore1").DataBind();

Similar Threads

  1. ASP.NET MVC ModelState Error display
    By RandomEugene in forum 2.x Help
    Replies: 2
    Last Post: Aug 17, 2013, 3:54 AM
  2. FormPanel
    By nedimkeskin in forum 2.x Help
    Replies: 3
    Last Post: Jan 31, 2013, 12:10 PM
  3. Div, FormPanel
    By rookie in forum 1.x Help
    Replies: 3
    Last Post: Nov 22, 2012, 1:10 PM
  4. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  5. [CLOSED] ModelState
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Feb 09, 2011, 4:47 PM

Posting Permissions