multiple selection pass arrray to code behind
multiple selection pass arrray to code behind
kwasior85
Posts: 1Questions: 0Answers: 0
Hi, I've got a challange to sort it out. I'm going to pass jquery array to asp.net code behind array.
Namely using tabletools-multiple row selection function I would like to copy selected values(anSelected) to asp.net code behind array.
[code]
//click handler
$('#Button2').click(function () {
oTable = $('#tblexample').dataTable();
var anSelected = fnGetSelected(oTable);}
function fnGetSelected(oTableLocal) {
var aReturn = new Array();
var aTrs = oTableLocal.fnGetNodes();
for (var i = 0; i < aTrs.length; i++) {
if ($(aTrs[i]).hasClass('row_selected')) {
aReturn.push(aTrs[i]);
}
}
return aReturn;
}
[/code]
thanks in advance.
kwasior
Namely using tabletools-multiple row selection function I would like to copy selected values(anSelected) to asp.net code behind array.
[code]
//click handler
$('#Button2').click(function () {
oTable = $('#tblexample').dataTable();
var anSelected = fnGetSelected(oTable);}
function fnGetSelected(oTableLocal) {
var aReturn = new Array();
var aTrs = oTableLocal.fnGetNodes();
for (var i = 0; i < aTrs.length; i++) {
if ($(aTrs[i]).hasClass('row_selected')) {
aReturn.push(aTrs[i]);
}
}
return aReturn;
}
[/code]
thanks in advance.
kwasior
This discussion has been closed.