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
375
How get the value of a checkbox when using a RowEditTemplate?
posted

Hello everybody!

 

I have a model with a boolean parameter.

In a igGrid, the boolean value is displayed in a checkbox as well as in a igDialog.

In fact, when editing a row, I use the mode RowEditTemplate. The problem is that I can't get the value of the boolean value when editing the row (I need it for disabling or not a combo in the same igDialog).

 

Here a part of the (simplified) code:

<script id="RowEditDialogRowTemplate1" type="text/x-jquery-tmpl">         

<tr><td>${headerText}</td><td data-key='${dataKey}'>{{if ${headerText} =='boolvalue'}}<input class="check" id="${dataKey}_inputcheck" type='checkbox' checked ="checked"/>{{else}}<input id="${dataKey}_input"/> {{/if}} </td></tr>

</script>

<h2>Produits</h2>

         @(Html.Infragistics().Grid<Model>()    

.ID("grid1") .PrimaryKey("Id") .RenderCheckboxes(true).Columns(column => { 

column.For(x => x.Id).Hidden(true);

column.For(x => x.Name);       

column.For(x => x.boolvalue);

column.For(x => x.Status);})       

.Features(features =>{              

 features.Updating().EditMode(GridEditMode.RowEditTemplate).RowEditDialogRowTemplateID("RowEditDialogRowTemplate1").Validation(true).EnableAddRow(true).ColumnSettings(settings =>{

            settings.ColumnSetting().ColumnKey("Status").EditorType(ColumnEditorType.Combo) .ComboEditorOptions(options => {options.DataSource(statusSource);   });});})      

 .EnableHoverStyles(true) .Height("500px").Width("100%").DataSourceUrl("/api/products/").LocalSchemaTransform(true).DataBind().Render())   

 

Then, when opening the rowTemplate:

$(#grid1").live("iggridupdatingroweditdialogopening", function (e, ui) { /*How I can get the value of the checkbox for disable or not the combo Status???*/ }

 

Please, if anyone have an idea or a solution, let me know.

Regards,

F2O