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
305
How to place radio button in iggrid Row Edit Template ?
posted

In iggrid rowedit template to have radio button what options to give? I need to place radion button in rowEdit Dialog

Parents
No Data
Reply
  • 3595
    Suggested Answer
    posted

    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}}

           </td>

       </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.

    igGridUsingTemplates-RadioButtons.zip
Children