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
MCP Servers
AI for UI
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
UI Tools
CMS
Free Tools
Support and Learning
Productivity and Design Tools
protected void radGridActivity_UpdateCommand(object source, GridCommandEventArgs e)
{
}
int
rowindex = -1;
protected
void
RadGrid1_UpdateCommand(
object
source, GridCommandEventArgs e)
GridEditFormItem editItem = (GridEditFormItem)e.Item;
rowindex = editItem.ItemIndex;
RadGrid1_PreRender(
sender, EventArgs e)
if
(rowindex > -1)
GridDataItem item = (GridDataItem)RadGrid1.Items[rowindex];
item.Selected =
true
;
int varGrid1RowIndex = -1;
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
DataTable objDataTable = GetGridData(); /*objDataTable must contain autoId column*/
DataRow objNewDataRow = objDataTable.NewRow();
.
if(/*insert is success*/)
varGrid1RowIndex = Convert.ToInt32(objNewDataRow["autoId"].ToString());
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
GridEditableItem objEditedItem = e.Item as GridEditableItem;
if(/*Update is success*/)
DataRow[] objArrayChangedDataRow = objDataTable.Select("" + "autoId" + " = " + objEditedItem.OwnerTableView.DataKeyValues[objEditedItem.ItemIndex]["autoId"]);
varGrid1RowIndex = Convert.ToInt32(objArrayChangedDataRow[0]["autoId"].ToString());
protected void RadGrid1_PreRender(object sender, EventArgs e)
if (varGrid1RowIndex > -1)
for (int i = 0; i <
RadGrid1.Items.Count
; i++)
autoId
=
Convert
.ToInt32(RadGrid1.Items[i].OwnerTableView.DataKeyValues[i]["autoId"].ToString());
if (autoId == varGrid1RowIndex)
RadGrid1.Items[i]
.Selected
<telerik:RadGrid
ID
"RadGrid1"
runat
"server"
OnNeedDataSource
"RadGrid1_NeedDataSource"
OnDeleteCommand
"RadGrid1_DeleteCommand"
OnInsertCommand
"RadGrid1_InsertCommand"
OnUpdateCommand
"RadGrid1_UpdateCommand"
OnPreRender
"radGridActivity_PreRender"
>
<
MasterTableView
DataKeyNames
"autoId"
Columns
telerik:...
</telerik:RadGrid>