Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Tuesday, 23 December 2014

Get Selected row from GridView

function GetSelectedRow(lnk) {
            var row = lnk.parentNode.parentNode;
            var rowIndex = row.rowIndex - 1;

            var start = row.cells[5].getElementsByTagName("input")[0].value;
            var end= row.cells[6].getElementsByTagName("input")[0].value;

            alert(start);
            alert(end);

            var t1=0; var t2=-0;
            var _txt3=0;

            if (start.value != "")
            t1 = start.value;
            alert(t1);
           

            if (end.value != "")
             t2 = end.value;
               alert(t2);
      
           if(t2 >= t1)
            _txt3.value = parseInt(t1) - parseInt(t2);
            alert(_txt3.value)
}

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.