Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1300
Template Issue in IgniteUI 2013.1
posted

In my project we upgraded infragistics NetAdvantage 2012.1 to IgniteUI 2013.1 and also  mvc4 (Infragistics.Web.Mvc.dll),

We used template for check box in ig-grid  to display status   and it is working fine in NetAdvantage 2012.1 version  but when we upgraded to new version that check box in ig-grid is not displaying properly as showing status as unchecked every time when we checked and saved also.

please find below code  written  in cshtml

for loading script and css

 <script src="@Url.Content("~/Scripts/InfragisticsjQueryMVC/common/js/infragistics.loader.js")" type="text/javascript"></script>


@(Html.Infragistics().Loader().ScriptPath(Url.Content("~/Scripts/InfragisticsjQueryMVC/common/js/")).CssPath(Url.Content("~/Scripts/InfragisticsjQueryMVC/common/css/")).Theme("metro").Render())


@(Html.Infragistics().Loader().ScriptPath(Url.Content("~/Scripts/InfragisticsjQueryMVC/common/js/")).CssPath(Url.Content("~/Scripts/InfragisticsjQueryMVC/common/css/")).Theme("metro").Resources("igCombo").Render())

for Grid

 @( Html.Infragistics().Grid<LoneOakOrigination.Domain.Template>()
      .ID("igGridAdminTemplates")
      .AutoGenerateColumns(false)
      .PrimaryKey("PKTemplateID")
      .RenderCheckboxes(true)
      .Columns(column =>
         {
             column.For(x => x.PKTemplateID).HeaderText("PKTemplateID").Width("0px").Hidden(true);
             column.For(x => x.Category).HeaderText("Category").Width("170px");
             column.For(x => x.Description).HeaderText("Description").Width("200px");
             column.For(x => x.FileName).HeaderText("Filename").Width("240px");
             column.For(x => x.UpdatedDate).HeaderText("Updated Date").Width("100px").Format("MM/dd/yyyy");
            column.For(x => x.Active).HeaderText("Active?").Width("80px").Template("<input type=\"checkbox\" {{if ${Active} === \"true\"}} checked=\"checked\" {{/if}} data-rowid=\"${PKTemplateID}\" disabled=\"disable\">");
                column.For(x => x.Path).HeaderText("Downloads").Width("110px").Template("<img src='../Images/Download.png' Title='Download Template' onclick='DownloadTemplate(${PKTemplateID})'/>&nbsp;&nbsp;&nbsp;&nbsp;<img src='../Images/Gear.png' title='Test Template'  onclick='PreviewTemplate(${PKTemplateID})' />");

         })
      .Features(features =>
        {
            features.Filtering();
            features.Paging().PageSize(50).ShowPageSizeDropDown(false);
            features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>
                {
                    settings.ColumnSetting().ColumnKey("PKTemplateID").AllowSorting(true).CurrentSortDirection("desc");
                });
            features.Updating().EditMode(Infragistics.Web.Mvc.GridEditMode.Row).Validation(true).StartEditTriggers(GridStartEditTriggers.DblClick).EnableAddRow(false);
            features.Selection().MouseDragSelect(true).MultipleSelection(true).Mode(SelectionMode.Row);
            features.Updating().ColumnSettings(settings =>
                {
                    settings.ColumnSetting().ColumnKey("PKTemplateID").ReadOnly(true);
                    settings.ColumnSetting().ColumnKey("Category").ReadOnly(true);
                    settings.ColumnSetting().ColumnKey("FileName").ReadOnly(true);
                    settings.ColumnSetting().ColumnKey("UpdatedDate").ReadOnly(true);
                    settings.ColumnSetting().ColumnKey("Path").ReadOnly(true);
                });
        })
      .Virtualization(false)
      .GenerateCompactJSONResponse(false)
      .ClientDataSourceType(ClientDataSourceType.JSON)
      .DataSourceUrl(Url.Action("GetAdminTemplates", "AdminTemplates"))
      .UpdateUrl(Url.Action("UpdateAdminTemplates", "AdminTemplates"))
      .AutoCommit(true)
      .Width("900px")
      .Height("500")
      .LocalSchemaTransform(true).JQueryTemplating(false)
      .DataBind()
      .Render()

   )

in above code "Active"  column check box is  creating issue. Please provide a solution as soon as possible