I have the following Radgrid control with AllowPaging = true. The Items in the Radgrid are sorted in decreasing order after the date in the second column. After I insert a row, I want the focus to be set on the page where the item was inserted. I have tried the following code in the Insert_Command event:
<telerik:RadGrid ID="rgCondica" runat="server" AllowPaging="true" AllowCustomPaging="true" AllowSorting="True" AutoGenerateColumns="False" Skin="Windows7" OnItemCommand="rgCondica_ItemCommand" OnItemDataBound="rgCondica_ItemDataBound" OnInsertCommand="rgCondica_InsertCommand" OnUpdateCommand="rgCondica_UpdateCommand" OnDeleteCommand="rgCondica_DeleteCommand" OnNeedDataSource="rgCondica_NeedDataSource" CellSpacing="0" CssClass="c1grid" GridLines="None" PageSize="5" PagerStyle-ShowPagerText="False" PagerStyle-AlwaysVisible="true" MasterTableView-NoMasterRecordsText="Nu exista inregistrari" PagerStyle-FirstPageToolTip="Prima pagina" PagerStyle-LastPageToolTip="Ultima pagina" PagerStyle-PageSizeLabelText="Nr. inregistrari:" PagerStyle-PrevPagesToolTip="Paginile anterioare" PagerStyle-PrevPageToolTip="Pagina anterioara" PagerStyle-NextPagesToolTip="Paginile urmatoare" PagerStyle-NextPageToolTip="Pagina anterioara"> </telerik:RadGrid>protected void rgCondica_InsertCommand(object sender,GridCommandEventArgs e){GridDataItem item = rgCondica.MasterTableView.FindItemByKeyValue("IdCondica", c.IdCondica); rgCondica.CurrentPageIndex = item.RowIndex; rgCondica.Rebind();}but it remains on the last page.
Any help is appreciated. Thank you.
