Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
"server"
AutoGenerateColumns
"false"
OnNeedDataSource
"RadGrid1_NeedDataSource"
ondatabound
"RadGrid1_DataBound"
onitemdatabound
"RadGrid1_ItemDataBound"
>
MasterTableView
Columns
telerik:GridButtonColumn
ButtonType
"ImageButton"
UniqueName
"MyImageButton"
</
protected
void
RadGrid1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
DataTable dt =
new
DataTable();
dt.Columns.Add(
"imgPath"
,
typeof
(
string
));
dt.Rows.Add(
"MCTS.png"
);
RadGrid1.DataSource = dt;
}
RadGrid1_DataBound(
sender, EventArgs e)
RadGrid1_ItemDataBound(
sender, GridItemEventArgs e)
if
(e.Item
is
GridDataItem)
GridDataItem item = e.Item
as
GridDataItem;
DataRowView dr = item.DataItem
DataRowView;
(item[
].Controls[0]
ImageButton).ImageUrl =
"~/images/"
+ dr[
];