Reputation: 949
Using .NET MVC3
following is my view,
function Dispalymaingrid () {
var Geo=$('#ddlGeo').val();
var Vertical=$('#ddlVertical').val();
var Month=$('#ddlMonth').val();
if(Vertical=="All")
{
var Flag=1;
}
else
{
var Flag=2;
}
$.ajax({
url:"@Url.Action("TRUnutilizedOwnershipChange", "TravelReady")",
datatype:"html",
type:"post",
data:{strGeo:Geo,strVertical:Vertical,intMonth:Month,intFlag:Flag},
error:function(){},
success:function(data){
$('.travTableContent').empty();
var text3=data.data.lstunutilizedownershipentities;
for( var item in text3)
{
$('<tr />').html(text3[item]).appendTo('.travTableContent');
$('<td />').html(text3[item].CurrentOwnership).appendTo('.travTableContent');
$('<td />').html(text3[item].cnt).appendTo('.travTableContent');
}
}
});
}
I want to get the count value from this line
$('<td />').html(text3[item].cnt).appendTo('.travTableContent');
I want to see this as a link what is the possible css prperty to $('<td />')
in this
Upvotes: 0
Views: 66
Reputation: 6612
Try this:
$('<td />').html('<a href="#your-link">' + text3[item].cnt + '</a>').appendTo('.travTableContent');
Update: Passing text3[item].CurrentOwnership
as argument
to GetDetail()
$('<td />').html('<a href="#" onclick="GetDetail(\'' + text3[item].CurrentOwnership + '\');">' + text3[item].cnt + '</a>').appendTo('.travTableContent');
Upvotes: 1