BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
[HttpPost]
public virtual ActionResult Index(PagingParams args, int? Id)
{
/// TODO: Refactor to use the template defined in the view
/// There is a defect in Syncfusion where the GridRequestParams only post if a 'template' style editing mode is not used
//var gridRequestParameters = System.Web.Helpers.Json.Decode(this.Request.Form["GridRequestParams"]);
string dialogTemplateName = "D" + typeof(T).Name;
RequestType currentRequest = (RequestType)Convert.ToInt32(args.RequestType);
if (currentRequest == RequestType.BeginEdit && Id.HasValue)
{
T item =
(T)this.Repo.GetByFieldValue("Id", Id);
return PartialView(dialogTemplateName, item);
}
else if (currentRequest == RequestType.BeginAddNew)
{
return PartialView(dialogTemplateName, new T());
}
else
{
return GetItems().GridActions<T>();
}
}
#endregion
DIALOG TEMPLATE VIEW -
@model My.Domain.Account
@Html.ValidationSummary(true)
<fieldset>
<legend>Account</legend>
@Html.HiddenFor(model => model.Id)
<div class="editor-label">
@Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Address)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Address)
@Html.ValidationMessageFor(model => model.Address)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.City)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.City)
@Html.ValidationMessageFor(model => model.City)
</div>
</fieldset>
Hi
Jeremy,
Thanks
for using Syncfusion products.
We
are sorry for the inconvenience caused. We have created a simple sample based
on the code snippet you have provided but we are unable to reproduce the issue.
For your convenience we have attached the sample and the same can be downloaded
from the link below.
Could
you please replicate the issue in the below sample and get back to us with more
information to reproduce your issue so that we could able to sort out the cause
of this issue and provide you a better solutions quickly?. The information
provided would be a great help for us to resolve this issue.
Please
let us know if you need any further assistance.
Regards,
Abdul
Matin M