Here I have created sample that will help you out.
HTML
<div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$.ajax({
type: "POST",
url: "Default.aspx/GetStatusData",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess
});
});
function OnSuccess(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var customers = xml.find("Table1");
var row = $("[id*=tblCustomers] > tbody tr:last-child").clone(true);
$("[id*=tblCustomers] tr").not(':has(th)').remove();
$.each(customers, function () {
var customer = $(this);
$(".Name", row).find("span").html($(this).find("Name").text());
var status = $(this).find("Status").text();
$(".Status", row).find("span").html(status);
status == 'Cancelled' ? $(".Select", row).find('input[type="checkbox"]').hide() : $(".Select", row).find('input[type="checkbox"]').show()
$("[id*=tblCustomers]").append(row);
row = $("[id*=tblCustomers] > tbody tr:last-child").clone(true);
});
}
</script>
<table id="tblCustomers" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>
Select
</th>
<th>
Name
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="Select">
<input type="checkbox" />
</td>
<td class="Name">
<span></span>
</td>
<td class="Status">
<span></span>
</td>
</tr>
</tbody>
</table>
</div>
C#
[WebMethod]
public static string GetStatusData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("Status");
dt.Rows.Add("Mudassar", "Approved");
dt.Rows.Add("Jhon", "Declined");
dt.Rows.Add("Bill", "Cancelled");
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds.GetXml();
}
VB
<WebMethod> _
Public Shared Function GetStatusData() As String
Dim dt As New DataTable()
dt.Columns.Add("Name")
dt.Columns.Add("Status")
dt.Rows.Add("Mudassar", "Approved")
dt.Rows.Add("Jhon", "Declined")
dt.Rows.Add("Bill", "Cancelled")
Dim ds As New DataSet()
ds.Tables.Add(dt)
Return ds.GetXml()
End Function
Screenshot