Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
"server"
AutoGenerateColumns
"false"
OnNeedDataSource
"RadGrid1_NeedDataSource"
OnUpdateCommand
"RadGrid1_UpdateCommand"
OnInsertCommand
"RadGrid1_InsertCommand"
>
MasterTableView
CommandItemDisplay
"Top"
DataKeyNames
"ID"
Columns
telerik:GridBoundColumn
DataField
UniqueName
HeaderText
</
"Name"
telerik:GridTemplateColumn
ItemTemplate
telerik:RadBinaryImage
"RadBinaryImage1"
DataValue='<%# Eval("Picture") == null ? null : ((System.Data.Linq.Binary) Eval("Picture")).ToArray() %>' />
EditItemTemplate
telerik:RadUpload
"RadUpload1"
telerik:GridEditCommandColumn
protected
void
RadGrid1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
using
(DataClassesDataContext _context =
new
DataClassesDataContext())
RadGrid1.DataSource = _context.TablePictures.ToList();
}
RadGrid1_UpdateCommand(
sender, GridCommandEventArgs e)
GridEditableItem item = e.Item
as
GridEditableItem;
TablePicture tp = _context.TablePictures.Where(i => i.ID == Convert.ToInt32(item.GetDataKeyValue(
))).FirstOrDefault();
tp.Name = (item[
].Controls[0]
TextBox).Text;
RadUpload RadUpload1 = item.FindControl(
)
RadUpload;
if
(RadUpload1.UploadedFiles.Count > 0)
UploadedFile attachment = RadUpload1.UploadedFiles[0];
byte
[] attachmentBytes =
[attachment.InputStream.Length];
attachment.InputStream.Read(attachmentBytes, 0, attachmentBytes.Length);
tp.Picture = attachmentBytes;
_context.SubmitChanges();
RadGrid1_InsertCommand(
TablePicture tp =
TablePicture();
tp.ID = Convert.ToInt32((item[
TextBox).Text);
_context.TablePictures.InsertOnSubmit(tp);