in grid i will select multiple cell in a row.. I need all the cell header in a varibale using jquery....
var selectedList = new Array();
$("#GridView1 td").click(function (event) {
var add = true;
var $This = $(this);
var col = $This.parent().children().index($(this));
var title = $This.closest("#GridView1").find("th").eq(col).text();
var len = selectedList.length;
for (var i = 0; i <= len; i++) {
if (selectedList[i] == title) {
//remove title if exist already(it mean uncheck)
selectedList.splice(i, 1);
add = false;
break;
}
}
if (add)
selectedList.push(title);
alert(selectedList.toString());
Am using the above coding.. But it wokrs wrongly.. help me to solve this
Go to the complete details ...