In iggrid rowedit template to have radio button what options to give? I need to place radion button in rowEdit Dialog
Is there igradiobutton or what is the syntax for radio button
this is working fine. but how to set radio button checked as per dynamic value? cos there would be more then one value and respective radio button will have to checked? waiting for your response as soon as possible.
Hello Renganathan,
I am following up to check if you need any additional assistance. If so, don’t hesitate to contact us again.
Thank you for posting in our forum.
One possible approach is using the rowEditDialogRowTemplateID setting with the “Updating” feature:
$("#grid1").igGrid({
columns: [
…
],
features:[
{
name:"Updating",
editMode: "rowedittemplate",
rowEditDialogRowTemplateID: "t1"
}
I have defined ‘t1’ in by the following code:
<script id="t1" type="text/x-jquery-tmpl">
<tr class="tableBackGround">
<td> ${headerText}
</td>
<td data-key='${dataKey}'>
{{if ${headerText} == "Distributor"}}
<div><input style="margin-left:-56px" type='radio' name='d' value='l' ></div><div style="margin-top:-20px; margin-left: 22px">Leap</div>
<div><input type='radio' name='d' value='m' >Merge</div>
{{else}}
<input />
{{/if}}
</tr>
</script>
I have attached a sample presenting the solution. Feel free to modify it and use it for custom projects.
Please note that first radio input is needed to be styled additionally.
If you need any further assistance please let me know.
Thank you for using our RowEditTemplate.
By default you can use the approach with the rowEditDialogRowTemplate
http://help.infragistics.com/Help/Doc/jQuery/2013.2/CLR4.0/html/igGrid_Updating_RowEditTemplate.html#_Toc335653829
http://help.infragistics.com/jQuery/2013.2/ui.iggridupdating#options
At this moment it supports only type="checkbox" AFAIK.
Martin Pavlov has shared a solution of custom radio editor provider:
http://es.infragistics.com/community/forums/p/79283/401560.aspx#400464
Unfortunately it works only in editMode:”row” because the RowEditTemplate uses custom logic when loading the editors.
So what I can suggest you at the moment is using checkbox type and setting custom rowEditDialogRowTemplate for the purpose.
If you insist on radio button you can use row edit mode.
Let me know if you need further assistance.