My code excerpt for the gridview is like below:
<
telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="LinqDataSource2" Skin="Office2007"
ShowStatusBar="True" Width="100%" AutoGenerateColumns="False" AllowSorting="True"
AllowAutomaticDeletes="true" AllowPaging="true" GridLines="None" AllowAutomaticInserts="false"
AllowAutomaticUpdates="True" OnItemInserted="RadGrid2_ItemInserted" OnItemUpdated="RadGrid2_ItemUpdated"
OnItemDeleted="RadGrid2_ItemDeleted" OnInsertCommand="RadGrid2_InsertCommand"
OnUpdateCommand="RadGrid2_UpdateCommand" OnDeleteCommand="RadGrid2_DeleteCommand"
OnItemDataBound="RadGrid2_ItemDataBound" OnItemCommand="RadGrid2_ItemCommand"
OnSortCommand="RadGrid2_SortCommand" OnCancelCommand="RadGrid2_CancelCommand"
OnEditCommand="RadGrid2_EditCommand" BorderColor="#bbd9ee" OnPageIndexChanged="RadGrid2_PageIndexChanged">
<HeaderContextMenu EnableTheming="True" Skin="Office2007">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
<MasterTableView DataKeyNames="ExerciseID" DataSourceID="LinqDataSource2" Width="100%"
CommandItemDisplay="Top">
<CommandItemSettings AddNewRecordImageUrl="images/AddNew.gif" AddNewRecordText="Add New Exercise" />
<CommandItemStyle CssClass="green_heading_underline" />
.....
.....
Code for ItemCommand is like below:
protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e)
{
if ((e.CommandName == "ExpandCollapse") || (e.CommandName == "InitInsert"))
{
UpdatePanel2.Update();
}
}
Can anybody help?