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
495
Radiabutton list in igHirerachicalgrid
posted

Hi, How can introduce the radio button list in igHirerachicalgrid.

I did achieve it by template column but they do not work as all the buttons in the rows have same name and id. So is there a way to do so that they have different group name for each row and id's?

My sample code:

eSignaturegroup.Group.Add(new GridColumn() { Rowspan=2 , HeaderText = "In Person",Key = "eSign",DataType = "bool",Width = "10%",FormatterFunction = GetESign("InPerson") });
eSignaturegroup.Group.Add(new GridColumn() { HeaderText = "Remote",Key = "eSign",DataType = "bool",Width = "10%",FormatterFunction = GetESign("Remote") });
 
private  string GetESign(string eSign)
       {
        
          
           var sb = new StringBuilder();
           sb.Append(" function(obj){");
          if (eSign.Equals("InPerson"))
           {
               sb.Append(" if (obj == 0 ){return ' <ul class=radio-group> <li><input id=InPerson_" + i + " name=esign_" + i + " type=radio checked=checked /> <label for=InPerson_" + i + "><span><span></span></span></label></li></ul>';}");
               sb.Append(" if (obj == 1 ){return '<ul class=radio-group> <li><input id=InPerson_" + i + " name=esign_" + i + " type=radio   /><label for=InPerson_" + i + "><span><span></span></span></label></li></ul>';}");
              
           }
           else if (eSign.Equals("Remote"))
           {
               sb.Append(" if  (obj == 1 ){ return '<ul class=radio-group> <li><input id=Remote_" + i + "  name=esign_" + i + "  type=radio checked=checked /><label for=Remote_" + i + "><span><span></span></span></label></li></ul>';} ");
               sb.Append(" if (obj == 0 ){return '<ul class=radio-group> <li><input id=Remote_" + i + "  name=esign_" + i + " type=radio  /><label for=Remote_" + i + "><span><span></span></span></label></li></ul>';}");               
           };
         sb.Append("} ");
          
           return sb.ToString();
 
is there a way where I can send the row index so that it can work. Also how can I send the row index in this context?
Your help is much appreciated.
Parents Reply Children
No Data