BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
[Incorrect code] <td style="text-align: left"> <input id="Answer_IsCorrect" name="IsCorrect" value="{{:IsCorrect}}" class="e-field e-ejinputtext" /> <td style="text-align: left"> <input id="Answer_IsCorrect" name="Answer_IsCorrect" value="{{:IsCorrect}}" class="e-field e-ejinputtext" /> |
<td style="text-align: left"> {{if Answer_IsCorrect}} <input id="Answer_IsCorrect" name="Answer_IsCorrect" type="checkbox" checked="checked" /> {{else}} <input id="Answer_IsCorrect" name="Answer_IsCorrect" type="checkbox" /> {{/if}} |
We are happy that your requirements are met.
If you have any queries in the future, please get back to us. We will be happy to assist you.
Regards
Ragavee U S
}var categories = GetCategories(); // get from servicevar CategoryId = new List<object>();foreach (var item in categories){CategoryId.Add(new { value = item.CategoryId, text = item.TextFr });}return CategoryId
Query #1: can i display the text in all rows like in row 1 for example?
We have analyzed the above query and the code snippets that you have shared with us. In order to achieve your requirement, we suggest you to use the foreignKey feature of the grid.
For your convenience, we have created a sample based on your requirement and the same can be downloaded from the below location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/119709/ze/Hierarchy_Sample680951067
In the above sample, we have a foreignKey column “ReportsTo” that binds to the Employee Table. Thus with “ReportsTo” as value, we have displayed the “FirstName” of the employee in the grid. Please refer the below code snippet.
@(Html.EJ().Grid<object>("ParentGrid") .Datasource(ds => ds.Json((IEnumerable<object>)ViewBag.Master) .BatchURL("/Home/BatchUpdateParent") .Adaptor(AdaptorType.RemoteSaveAdaptor)) . . . . . .Columns(col => { col.Field("EmployeeID").HeaderText("Employee ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Add(); . . . . . col.Field("ReportsTo").HeaderText("Employee Name").ForeignKeyField("ReportsTo") .ForeignKeyValue("FirstName").DataSource((IEnumerable<object>)ViewBag.Master).Add(); }) . . . . public ActionResult Index() { var DataSource1 = EmployeeRepository.GetAllRecords().ToList(); ViewBag.Master = DataSource1; return View(); |
<div style="margin-top:30px"> @(Html.EJ().Grid<object>("ParentGrid") . . . . .ChildGrid(childnew => { childnew.Datasource(ds => ds.URL("/Home/ChildData") .BatchURL("/Home/BatchUpdateChild") .Adaptor(AdaptorType.UrlAdaptor)) .QueryString("EmployeeID") . . . . . .ClientSideEvents(c => c.BeforeBatchSave("batchSave")); }) ) </div>
<script type="text/javascript"> function batchSave(args) { for (var i = 0; i < args.batchChanges["added"].length; i++) { args.batchChanges["added"][i][args.model.queryString] = args.model.parentDetails.parentKeyFieldValue; } } |