Hi,
I am using hierarchy grid to display data and also added Add new record option to insert an new row. I have set the Editmode-"In Place". After entering an new record and when i clicked the Update button. it is redirecting to server side InserCommand and i have return logic to insert this new record to database. But in the UI screen it still remains in the Edit mode, it is not coming into normal mode after execution.
Please find the below code.
I am using hierarchy grid to display data and also added Add new record option to insert an new row. I have set the Editmode-"In Place". After entering an new record and when i clicked the Update button. it is redirecting to server side InserCommand and i have return logic to insert this new record to database. But in the UI screen it still remains in the Edit mode, it is not coming into normal mode after execution.
Please find the below code.
<telerik:RadGrid ID="radGridEngMemberAccess" runat="server" ShowStatusBar="true" AutoGenerateColumns="false" GridLines="None" AllowMultiRowEdit="false" > <MasterTableView DataKeyNames="JobID" AllowMultiColumnSorting="True" Width="100%" CommandItemDisplay="None" AllowAutomaticDeletes="false" Name="CloseOutDetails" > <CommandItemSettings ShowRefreshButton="false" /> <DetailTables> <telerik:GridTableView Width="100%" runat="server" CommandItemDisplay="Bottom" Name="EngMemberDetails" DataKeyNames="ID" EditMode="InPlace" > <PagerStyle Mode="NextPrevAndNumeric" /> <CommandItemSettings AddNewRecordText="Add new user" /> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" > <HeaderStyle Width="30px" /> <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn SortExpression="Name" HeaderText="User Name" HeaderButtonType="TextButton" DataField="Name" UniqueName="colName"> </telerik:GridBoundColumn> <telerik:GridDropDownColumn SortExpression="Role" HeaderText="Role" DataSourceID="XmlDataSource1" HeaderButtonType="TextButton" ListTextField="Name" ListValueField="ID" DataField="Role" UniqueName="colRole" /> <telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="IsActive" UniqueName="colIsActive" HeaderStyle-Width="10%" /> <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton" DataField="ID" UniqueName="ID" ReadOnly="true" Visible="false"/> <telerik:GridButtonColumn ConfirmText="Do you wand to delete the user?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2"> <HeaderStyle Width="20px" /> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> </Columns> <SortExpressions> <telerik:GridSortExpression FieldName="Name"></telerik:GridSortExpression> </SortExpressions> </telerik:GridTableView> </DetailTables> <Columns > <telerik:GridBoundColumn SortExpression="CloseOutName" HeaderText="CloseOut Name" HeaderButtonType="TextButton" DataField="CloseOutName" > </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CloseOutType" HeaderText="CloseOut Type" HeaderButtonType="TextButton" DataField="CloseOutType" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="JobID" HeaderText="JobID" HeaderButtonType="TextButton" DataField="JobID" UniqueName="JobID" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn SortExpression="PeriodEndDate" HeaderText="PeriodEndDate" HeaderButtonType="TextButton" DataField="PeriodEndDate" UniqueName="PeriodEndDate" DataFormatString="{0: MM/dd/yyyy}" ReadOnly="true"> </telerik:GridDateTimeColumn> </Columns> <HeaderStyle BorderColor="Blue" BackColor="Red"/> </MasterTableView> </telerik:RadGrid>