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();
}

Dilip GuptaRank #2,085 · 690 reputationPosted Nov 25, 2016, 2:32 AM EST
Vasanth JackRank #5,346 · 302 reputationPosted Nov 25, 2016, 2:35 AM EST
Dilip GuptaRank #2,085 · 690 reputationPosted Nov 25, 2016, 2:39 AM EST
Vasanth JackRank #5,346 · 302 reputationPosted Nov 27, 2016, 9:11 PM EST