Questions tagged [editortemplates]
The editortemplates tag has no usage guidance.
93
questions
0
votes
1
answer
24
views
In MVC method for controller is not called from inside of the Editor Template
I need to initialize Kendo.ComboBox inside of the Editor Template.
I have defined the template as follows:
<script>
function GetReportID() {
return {
reportID: 8
...
0
votes
1
answer
155
views
How to populate Kendo.ComboBox with ajax?
I have a Kendo.ComboBox defined in the Editor Template.
This template is referenced in the index page when Kendo.Grid is populated:
co.Bound(c => c.Name).Title("Property Name").EditorTemplateName(...
-1
votes
1
answer
535
views
How to add command/button to Maya AETemplate?
I'm trying to integrate a simulator into Maya. I have a solver node. I would like to put a button on the attribute editor, "Simulate" for example that calls a command. How can this be achieved with ...
0
votes
1
answer
54
views
Model validation inside dialog
I'm using MVC 5 for my app where a user can create a Foo that has zero to many Bars.
My create view for Foo calls HTML.EditorForModel() which loads an editor template for Foo. My Foo template has the ...
0
votes
1
answer
387
views
Viewdata / Viewbag is empty in editorstemplate MVC
Mvc application with simple controller where i return a view with a model.
into u create view.
Couse of the large amount of dropdownlists i have several viewbags(13).
In the view I work with ...
1
vote
1
answer
959
views
MVC 5 EditorTemplate for Model renders with same id and name
I have Parent model "Receipt" and it has dictonary of objects as a property called CustomControlDictionary of class CustomControlModel.
In my view i loop throuh each object in CustomControlDictionary ...
1
vote
0
answers
48
views
MVC5 EditorTemplates for DataTypes Cached Locally?
I have a Datatype that I've made EditorTemplates for.
Double?
//Example of Double
@model Double?
@{
string name, id;
if (ViewData.ModelMetadata.ContainerType.Name.Contains("ViewModel"))
...
0
votes
2
answers
506
views
MVC 5 Ajax partial form validation
I'm using an Ajax.BeginForm in a strongly typed view. Within this form I have a few panels which hold model properties which in turn use their own models and editor templates. I want to post the whole ...
0
votes
2
answers
92
views
MVC model property passed as null
I have a strongly typed views where I pass editors for several properties eg.
public class BookingModel
{
public FirstPropertyModel FirstProperty { get; set; }
public SecondPropertyModel ...
-1
votes
2
answers
193
views
EditorTemplates Where or Groupby on Questionnaire
At the moment, I have a working prototype for a questionnaire with multiple questions and each question having multiple choices for an answer. Everything displays and saves great. However, I now ...
1
vote
0
answers
139
views
Editor Templates rendering multiple times (using Jquery)
public class PersonViewModel
{
Public string PersonName{get; set;}
Public string NumberOfCars{get;set;} // DropDown
}
Public Class CarViewModel
{
Public string CareMake{get; set;}
Public string ...
0
votes
1
answer
2k
views
How to convert decimal field value to currency in mvc
I have an few editorfor in my view like following
@Html.EditorFor(Model => Model.CashBalance)
Now when i enter any value in to that editorfor,the value should change to currency value in textbox ...
0
votes
1
answer
246
views
Invalid model when using petapoco and editortemplates
I am using Petapoco (in Umbraco) to fetch an IEnumerable from the DB and pass it to the view. Code below abbreviated for easy overview
Model:
public class Account
{
[Column("accountId")]
...
1
vote
2
answers
545
views
Disable Editor Template Date.cshtml on specific view
My Model
[DataType(DataType.Date, ErrorMessage = "Please enter a valid date in the format MM/dd/yyyy")]
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
[Display(...
0
votes
3
answers
606
views
MVC Input name wrong
I want to use a (bootstrap) modal to show a translationdialog but it's giving a wrong name.
In the browser sourcecode it shows NameTranslations.[0].Translation while it have to be NameTranslations[0]....
1
vote
1
answer
2k
views
Enable or Disable EditorTemplateName on a column in a kendo ui grid based on the column value
I have a grid with one of the columns has an EditorTemplate with a dropdownlist.
columns.Bound(i => i.TypeId).Title("Types").EditorTemplateName("Types").ClientTemplate("#: TypeId != 3 ? Type : '-'#...
2
votes
0
answers
2k
views
Multiple Kendo UI Grid with dropdown editor templates edit issues in ASP.NET MVC razor page
I have two Kendo UI grids with drop down editor template columns in an ASP.NET MVC razor page.Both grids are having one row always and working fine with edit and update.
But when the user clicks one ...
0
votes
1
answer
275
views
MVC Template editors and post
I'm at a beginner with ASP.NET MVC 4 and I have a problem. Basically I have this controller:
public ViewResult Login()
{
return View(new LoginViewModel());
}
[HttpPost]
public ActionResult Login(...
1
vote
0
answers
681
views
Change ValidationSummary Template to add text
Using MVC 4/Razor
@HTML.ValidationSummary(True) generates:
First Name is required.
Last Name is required.
@HTML.ValidationSummary(True, "Please fix the following errors:") generates:
...
1
vote
1
answer
211
views
pass a model generated using automapper to Html.editorformodel()
I have multiple tables that have address fields in my database.
ex:
Person: name, address, address1, cityid, stateid, countryid, pincode, ..
Company: name, address, address1, cityid, stateid, ...
2
votes
0
answers
700
views
ASPNET MVC 4 editor template for jquery file upload (blueimp)
I'm trying to create an EditorTemplate for MVC4 for all my file inputs, I'm using blueimp jquery-file-upload plugin, and it's working great, however I have some doubts with the editor template:
I ...
4
votes
0
answers
95
views
Anyone know a slick way to find all references to an MVC EditorTemplate?
One of my favorite features in Asp.NET MVC (v2 and higher) is Editor / Display templates. They are a great tool for encapsulating rendering logic for a given object type. However, when templates (...
4
votes
2
answers
886
views
MVC3 Editor template doesn't generate client side validation
I have an issue, basically i have a form with lots of fields in it, and all of them have a required attribute set, so when you just leave it empty and click ok, you get client side validation and it ...
4
votes
1
answer
2k
views
Asp.net MVC with Entity, using jquery to pass data into List. Does not work
Edit 3 / Final
This is the fully working example using .NET MVC, Jquery and editor templates.
https://www.dropbox.com/s/t4yxbhkuowyd7va/exerciseTest.rar
Edit 2
It finally works ! Thanks to the ...
0
votes
1
answer
516
views
Custom Filename for @Html.EditorForModel()?
so I have the following code:
@model IEnumerable<My_School_Book.Models.Mark>
@{
ViewBag.Title = "Marks";
}
<div class="row-fluid">
<h1>Assignment Marks:</h1>
@...
1
vote
1
answer
736
views
mvc3, editor template, css clas, maxlength and size
I have an editor template as following but class, maxlength and size attributes are not getting to the source.
@using System.Globalization
@model DateTime?
@Html.TextBox("", (Model != null &&...
4
votes
1
answer
1k
views
EditorForModel - Duplicate labels when using editorfor
I am using a number of editor templates for different datatypes (string, DateTime, etc.) in my ASP.NET MVC application. For instance, the following is what I am using for strings:
<div class="...
2
votes
2
answers
3k
views
Selecting an alternate EditorFor template for a List
I have an object that represents a food item to order at a restaurant. This object has a list of Modifier Groups (sides, cooking instructions, pizza toppings, whatever) and each list has a list of ...
0
votes
5
answers
2k
views
Display a byte as a checkbox using a EditorTemplate?
My model class:
public class StatusList
{
public int StatusID {get;set;}
[UIHint("ByteCheckbox")]
public byte Active {get;set;}
}
In /Views/Shared/EditorTemplates I created a file called ...
2
votes
2
answers
1k
views
Template implementation for Html.ValidationMessageFor
I want to define HTML structure for Html.ValidationMessageFor in a View. This should be similar to EditorTemplates. How can this be done?
1
vote
2
answers
1k
views
@Html.EditorFor send empty array on post
In my model :
public class WzDetail
{
public Product Product { get; set; }
public bool check { get; set; }
public int PlanQuantity { get; set; }
public int ...
0
votes
1
answer
737
views
MVC EditorTemplate for list that is not part of the model
Within my view I call a partialview for a List. In that partial view I seperate that list into two IEnumerables and for each list I want to call the EditorTemplate for ModelType:
My PartialView:
@...
2
votes
1
answer
866
views
MVC3 - how can I override the template/behavior of EditorFor IEnumerable
I would like to globally replace the default editor with my own. The default just iterates and creates editors for each item in the model.
This doesn't give you control over the html structure (eg ...
2
votes
1
answer
838
views
Cannot use TypeConverter and custom display/editor template together?
The scenario
Suppose I have the following two model classes:
public class ProductColor
{
public long Id { get; set; }
public string Name { get; set; }
}
public class Product
{
public ...
1
vote
2
answers
2k
views
In a custom editor template, how do I access the field name I should use for the edit control? [duplicate]
Possible Duplicate:
How to get model's field name in custom editor template
When outputting an edit control for a special type of entity, for example, let’s say a color or something:
@Html....
10
votes
1
answer
6k
views
Custom Asp.net MVC 3 editor template not getting used
I have an MVC 3 web app that uses Razor view engine. I would like to extend default editor templates so I'd like to add additional HTML5 attributes to input elements like autofocus.
I'm using ...
1
vote
1
answer
3k
views
IEnumerable property with MVC3 EditorTemplate
Similar to this post IEnumerable model property in an ASP.NET MVC 3 Editor Template, I have
Model
public class Student
{
public int StudentId { get; set; }
public string StudentName{ get; ...
0
votes
1
answer
673
views
Asp.NET MVC 2 dynamic editor template based on dropdown value
I am working on a model criteria builder. I have a dropdown list with all of the model properties, a dropdown list with static operators (less than, equals, like, etc) and a user input form element ...
1
vote
1
answer
724
views
Choosing between CheckBoxFor and TextBoxFor in Editor Template
I've got an editor template that is applied to several data types. Most of them are displayed by TextBoxFor, but I'd like to use CheckBoxFor on the booleans (these are not nullable). As it is now:
...
1
vote
3
answers
813
views
MVC3 Editor Template for List Not Populating
Problem: When I load the EditorTemplate for UserModel the UserRoles list does not generate a list of UserRole editors.
My models:
public class UserSearchModel
{
[ScaffoldColumn(false)]
...
1
vote
2
answers
2k
views
Nullable DateTime, EditorTemplates, JQ UI DatePicker
My intent was to apply the JQuery UI Datepicker to my entire site by creating an EditorTemplate as per this post ASP.NET MVC 2 Templates
@model DateTime
@{
string name = ViewData.TemplateInfo....
0
votes
1
answer
2k
views
Apply even/odd style in MVC editor template for List<> model
I'm trying to apply some odd/even style to rows of data rendered by a Razor editor template in ASP.NET MVC 3.
Here is some basic code of my possible view:
@model List<MyProject.Whatever>
@...
1
vote
3
answers
1k
views
Trouble with this simple EditorTemplate for DateTime objects
I'd like to configure the EditorFor template for every datatime objects in any of my models.
I'm getting this error:
\EditorTemplates\DateTime.cshtml(1): error CS1973:
'System.Web.Mvc.HtmlHelper'...
0
votes
1
answer
769
views
MVC3 editor template for multiple types
I have a model with some parameters that a User should be able to see but not edit and others they should be able to edit. The same is true of the Author. So, I used [UIHint("Author")] and [UIHint("...
2
votes
1
answer
7k
views
MVC 3 - Editor template for List<> Model [closed]
I am building my first Razor app and really loving it. I am trying to get the low-down on how to create an editor template that renders out an editable list of items without a foreach loop. Is this ...
30
votes
1
answer
5k
views
In an Editor Template call another Editor Template with the same Model
I have an editor template and within that editor template i want to call another editor template with the same model (i.e. nested), but it does not seem to display.
ie. \EditorTemplates\Template1....
7
votes
5
answers
3k
views
How to create a editor template for DateTime with 3 fields?
I want to create an editor template for DateTime, I need 3 separated fields:
(DropDown) Day | (DropDown) Month | (DropDown) Year
How and where do I create this file? And what do I need ...
1
vote
1
answer
170
views
How do I put editor templates in an Eclipse plug-in?
I know how to put plain text and code in the editor. Is it possible to put an editor template programmatically in an Eclipse plug-in?
0
votes
2
answers
1k
views
Bind model during post of form inside EditorTemplate (on array)/multiple bind prefixes?
I have a complex Model containing an array. For rendering items for this array I'm using EditorFor like this:
for (int i = 0; i < Model.Contacts.Phones.Length; i++)
{
@Html.EditorFor(x =...
2
votes
2
answers
934
views
MVC 3 EditorTemplates not working on production
I'm facing a strange problem when deploying my application to the production server.
I've used the Editor Templates to create date pickers (add class to date box and let jquery show the date picker)....