In iggrid rowedit template to have radio button what options to give? I need to place radion button in rowEdit Dialog
Hello Renganathan,
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.
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.
I am following up to check if you need any additional assistance. If so, don’t hesitate to contact us again.