我如何...使用复选框检查gridView导出逐行导出

问题描述:

function validateUserInput2()
        {        
           
            alert("inside function"); //executing
            var myGrid = document.getElementById("<%= DataGrid1.ClientID %>");
            
            var rowcount = myGrid.rows.length;
      
          //  var cell;
          //  var j=0;
            alert("at grid before itereation"); //executing
            for (var i = 0; i < rowcount; i++) 
            {
                alert("grid iteration"); //executing
                        
       if(myGrid.rows[i].cells(0).type = "checkbox") //not entering this condition
                {
                    alert(" checkbox"); //not executing
                    if(mygrid.rows[i].cell[0].childNodes[0]==true)
                    {
                        break;
                        alert("checkbox check"); //not executing
                    }
                }
             }
         }

这些链接可能对您有帮助 -

导出选中(选中)GridView Rows到ASP.Net中的PDF [ ^ ]

导出所选的GridView ASP.Net中的Excel文件行 [ ^ ]
These links might help you -
Export selected (checked) GridView Rows to PDF in ASP.Net[^]
Export selected GridView Rows to Excel file in ASP.Net[^]