We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CRUD with MVC model Data Annotations Dialog Template using model

Thread ID:

Created:

Updated:

Platform:

Replies:

124454 Jun 10,2016 02:18 PM UTC Jun 14,2016 11:17 AM UTC ASP.NET MVC 3
loading
Tags: Grid
Sidnei V Lavandoski
Asked On June 10, 2016 02:18 PM UTC

Hi.

I saw the response for the post "Datasource with model and Data Annotations with URL insert, edit, delete in a grid with dialogtemplate", thread # 124436.

I would like to use helper controls in the template (modal dialog), like @Html.EJ().NumericTextbox, etc using model object,.

Is there a way to use a partial view instead javascript template for modal CRUD with MVC Data Annotations? I think that will be ease to write the Razor code instead directly html/javascript code.

The partial views will be like this:

@model mymodel

<form id="formCRUD" method="post">
   <div class="panel panel-primary">
                    <div class="panel-heading text-center">
                        <h3 class="panel-title">My Title</h3>
                    </div>
                    <div id="corpoForm" class="panel-body">
                        <fieldset>
                            <div class="form-group">
                                @Html.LabelFor(m => m.pro1, new { @class = "control-label" })
                                @Html.EJ().NumericTextbox(m => m.prop1, new { @class = "form-control", placeholder = "my placeholder..." })
                            </div>
                          ...
                        </fieldset>
                       <div class="panel-footer">
                          ...
                        </div>
   </div>
</div>


Thank you.

Karthick Kuppusamy [Syncfusion]
Replied On June 13, 2016 11:42 AM UTC

Hi Sidnei,   
  
Thanks for contacting Syncfusion support.   
  
We can’t use the HTML helper of ejcontrols in the template using model object in partial view. While rendering HTML helper of ejcontrols inside the template in partialview Jsrender will append the element to the template without the instance of ejcontrols. So, the bindings of the ejcontrols will not work.   
  
We can use other default HTML helper elements like textbox, default dropdown in the template with the partial view.   
  
Regards,   
Karthick K.  


Sidnei V Lavandoski
Replied On June 13, 2016 03:55 PM UTC

Thank you Karthick, but I was thinking to use MVC Razor Partial View instead template.

Can I disable the EditMode and use a "Edit Custom Mode", customizing Toolbar buttons to call the Controllers for CRUD?

In fact I would like to use all functions of EJ Grid and use external Bootstrap modal to CRUD operations, like this example http://www.advancesharp.com/blog/1125/search-sort-paging-insert-update-and-delete-with-asp-net-mvc-and-bootstrap-modal-popup-part-1

Thank you again.

Karthick Kuppusamy [Syncfusion]
Replied On June 14, 2016 11:17 AM UTC

  
Hi Sidnei, 
We considered this “Customizing Toolbar buttons to call the Controllers for CRUD operation as an custom sample request and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
 
 
Regards, 
K.Karthick. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;