All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
telerik:GridImageColumn
DataType
=
"System.String"
DataImageUrlFields
"CustomerID"
DataImageUrlFormatString
"IMG/{0}.jpg"
AlternateText
"Customer image"
DataAlternateTextField
"ContactName"
ImageAlign
"Middle"
ImageHeight
"50px"
ImageWidth
HeaderText
"Image Column"
FooterText
"ImageColumn footer"
UniqueName
"GridImageColumn"
>
</
protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
GridDataItem data = (GridDataItem)e.Item;
System.Web.UI.WebControls.Image imgecol = (System.Web.UI.WebControls.Image)data[
].Controls[0];
imgecol.Attributes.Add(
"OnClick"
,
"Click('"
+ data.ItemIndex +
"')"
);
}
<script type=
"text/javascript"
function
Click(index) {
var
masterTable = $find(
"<%=RadGrid1.ClientID%>"
).get_masterTableView();
masterTable.fireCommand(
"Select"
, index);
</script>