Hi,
I'm having the same problem, on the same code, but ASP.NET for the MVC 5 EJ2 version, is there any news about it?
|
[index.cshtml]
@using dotnet_mvc_sample.Controllers;
@{
List<object> toolbarItems = new List<object>();
toolbarItems.Add("Add");
toolbarItems.Add("Edit");
toolbarItems.Add("Delete");
toolbarItems.Add("Update");
toolbarItems.Add("Cancel");
}
// bind the class model to the Grid
@(Html.EJS().Grid<HomeController.BigData>("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("150").Add();
col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add();
col.Field("Freight").HeaderText("Freight").EditType("numericedit").Width("160").Format("N2").Add();
col.Field("ShipCountry").EditType("dropdownedit").HeaderText("Ship Country").Width("140").Add();
}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true); }).Toolbar(toolbarItems).Render())
|
|
[HomeControllers.cs]
public class BigData
{
public BigData()
{
}
-----
[Key]
public int? OrderID { get; set; }
[MinLength(3, ErrorMessage = "Need atleast 3 characters")]
[MaxLength(10, ErrorMessage = "Characters exceed")]
public string CustomerID { get; set; }
[Required]
public string ShipCountry { get; set; }
public int? ID1 { get; set; }
public int? ID2 { get; set; }
public int? EmployeeID { get; set; }
[Range(0, 100)]
public double? Freight { get; set; }
public string ShipCity { get; set; }
public bool Verified { get; set; }
public DateTime? OrderDate { get; set; }
public string ShipName { get; set; }
public DateTime ShippedDate { get; set; }
public string ShipAddress { get; set; }
}
|
I am having issues with data annotation validation in partial views. Do you have any fix for this issue? If yes, can you share how to implement it?
Hi Nayas,
Thanks for contacting Syncfusion support.
Kindly share the following details to proceed further on your requirement.
Regards,
Rajapandiyan S