How to Bind datalist in Client side using Jquery and Ajax,I tried But i cant bind the datalsit.I get the values from server side but i cannot bind the values in the client side.Please Help.
Already Am using Webmethod to get the values from server.Here Is my code
function succes(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var customers = xml.find("tblProddetails");
debugger;
var repeatColumns = parseInt("<%=dlViewProd.RepeatColumns == 0 ? 1 : dlViewProd.RepeatColumns %>");
var rowCount = Math.ceil(customers.length / repeatColumns);
var i = 0;
while (i < repeatColumns * rowCount) {
var row = $("[id*=dlViewProd]").eq(0).clone(true);
for (var j = 0; j
var customer = $(customers[i]);
if (customer.length == 0) {
$("table:last", row).remove();
}
else {
$("#img1", row).eq(j).html(customer.find("ProductImage").text());
$("#lblPrice", row).eq(j).html(customer.find("ProductPrice").text());
$("#lnkId", row).eq(j).html(customer.find("ProductName").text());
}
i++;
}
$("[id*=dlViewProd]").append(row);
}
$("[id*=dlViewProd] ").eq(0).remove();
$("[id*=dlViewProd]").show();
}
Vasanth JackPosted Nov 28, 2016, 2:11 AM
Dilip GuptaPosted Nov 25, 2016, 7:39 AM
Vasanth JackPosted Nov 25, 2016, 7:35 AM
Dilip GuptaPosted Nov 25, 2016, 7:32 AM