Hi,
I am using the Telerik grid to display an image column alongwith other data columns. I am also making an Ajax call for data binding to allow for a searching records.The problem is that after that Ajax call the image column doesnt display anything.
I am using the template column for displaying the image as shown below:-
But the image is shown after an Ajax call when I use the client template code as shown below:-
I would like someone to suggest a solution for this problem.
I am using the Telerik grid to display an image column alongwith other data columns. I am also making an Ajax call for data binding to allow for a searching records.The problem is that after that Ajax call the image column doesnt display anything.
I am using the template column for displaying the image as shown below:-
columns.Template(
@<text>
<img alt="@item.CountryIcon" style='width:30px;height:auto' src="@Url.Content("http://url.com/" + item.CountryIcon) "/>
</text>).Title(
"Icon_2").Width(30);
But the image is shown after an Ajax call when I use the client template code as shown below:-
columns.Bound(b => b.CountryIcon)
.ClientTemplate(
" <img alt='<#= CountryIcon #>' style='width:30px;height:auto' src=" + Url.Content("http://url.com/") + "<#= CountryIcon #> />")
.Title(
"Icon").Width(30);
The problem with the client template code is that the image is not shown on page load and only after the Ajax call is made.
I would like someone to suggest a solution for this problem.