I have a hierarchical radGrid where the user can expand a parent row and then click on a child row to edit it in-place. I would like to provide them with a button on the parent row that would put all the child rows (for that parent row) in edit mode at the same time so that they can edit them all and save them all with 1 click.
I have researched this and found lots of info on how to do this on the parent rows but found nothing on how to do it on the child rows.
The way it is constructed is that the parent rows are in a "RadGrid" and the child rows are in a "GridTableView". Maybe this is where my problem is.
So, I need to either figure out how to accomplish it with what I have or to get some detail on how to redesign the grid to be able to do it.
Thanks in advance for any help or advise!
Here is my grid:
<telerik:RadGrid ID="rgTraveler" runat="server"
DataSourceID="SqlDataSourceTravelerMain"
AutoGenerateColumns="False"
AllowSorting="True"
AllowPaging="True"
PageSize="25"
Width="1200px"
OnUpdateCommand="rgTraveler_UpdateCommand"
OnCancelCommand="rgTraveler_CancelCommand"
OnItemCommand="rgTraveler_ItemCommand"
OnItemDataBound="rgTraveler_ItemDataBound"
AllowAutomaticUpdates="True"
GroupPanelPosition="Top">
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView EnableNoRecordsTemplate="true"
CommandItemDisplay="None"
InsertItemDisplay="Bottom"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
AlternatingItemStyle-HorizontalAlign="Center"
EditMode="InPlace"
DataKeyNames="PO">
<NoRecordsTemplate>
<div>There are no records to display.</div>
</NoRecordsTemplate>
<DetailTables>
<telerik:GridTableView DataSourceID="SqlDataSourceTravelerSub"
runat="server"
CommandItemDisplay="None"
Name="GridTableViewSub"
BackColor="White"
HeaderStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center"
AlternatingItemStyle-HorizontalAlign="Center"
EditMode="InPlace"
DataKeyNames="DetailID,ProdOrder,Source">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="ProdOrder" MasterKeyField="PO" />
</ParentTableRelation>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" UniqueName="EditCommandColumn" />
<telerik:GridBoundColumn DataField="Source" HeaderText="" SortExpression="Source" UniqueName="Source" ItemStyle-Width="10px" ReadOnly="True" Visible="true" />
<telerik:GridBoundColumn DataField="DetailID" HeaderText="DetailID" ReadOnly="true" SortExpression="DetailID" Visible="false" />
<telerik:GridBoundColumn DataField="ProdOrder" HeaderText="ProdOrder" ReadOnly="true" SortExpression="ProdOrder" Visible="true" />
<telerik:GridBoundColumn DataField="SerialNumber" HeaderText="SerialNumber" ReadOnly="true" SortExpression="SerialNumber" ItemStyle-Width="100px" />
<telerik:GridBoundColumn DataField="PassToStockDate" HeaderText="Pass To Stock Date" SortExpression="PassToStockDate" DataType="System.DateTime" ReadOnly="True" UniqueName="PassToStockDate" DataFormatString="{0:d}" ItemStyle-Width="200px" />
<telerik:GridCheckBoxColumn DataField="FinalPassedToStock" HeaderText="Final Passed To Stock" SortExpression="FinalPassedToStock" UniqueName="FinalPassedToStock" ItemStyle-Width="200px" />
<telerik:GridDateTimeColumn DataField="FinalPassedToStockDate" HeaderText="Final Passed To Stock Date" SortExpression="FinalPassedToStockDate" ItemStyle-Width="200px" UniqueName="rdpFinalPassedToStockDate" DataFormatString="{0:d}" />
<telerik:GridCheckBoxColumn DataField="HasIssue" HeaderText="HasIssue" SortExpression="HasIssue" UniqueName="HasIssue" />
<telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments" UniqueName="txtComments" ItemStyle-Width="500px" />
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn DataField="Source" HeaderText="" SortExpression="Source" UniqueName="Source" ItemStyle-Width="10px" ReadOnly="True" Visible="true" />
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="true" SortExpression="ID" DataType="System.Int32" Visible="false" />
<telerik:GridBoundColumn DataField="PO" HeaderText="Prod Order" SortExpression="PO" UniqueName="PO" ItemStyle-Width="200px" ReadOnly="True" />
<telerik:GridBoundColumn DataField="SalesOrder" HeaderText="Sales Order" SortExpression="SalesOrder" UniqueName="SalesOrder" ItemStyle-Width="200px" ReadOnly="True" />
<telerik:GridBoundColumn DataField="SalesItem" HeaderText="Sales Item" SortExpression="SalesItem" ReadOnly="true" ItemStyle-Width="50px" />
<telerik:GridBoundColumn DataField="Part" HeaderText="Part" SortExpression="Part" UniqueName="Part" ItemStyle-Width="200px" ReadOnly="True" />
<telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments" UniqueName="Comments" ItemStyle-Width="600px" ReadOnly="True" />
<telerik:GridBoundColumn DataField="InspectionCompleteDate" HeaderText="Inspection Complete Date" SortExpression="InspectionCompleteDate" DataType="System.DateTime" ReadOnly="True" UniqueName="InspectionCompleteDate" DataFormatString="{0:d}" ItemStyle-Width="200px" />
</Columns>
<EditFormSettings>
<EditColumn ButtonType="ImageButton" />
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSourceTravelerMain" runat="server" ConnectionString="<%$ ConnectionStrings:SetoutsConnectionString %>"
SelectCommand="sp_GetTravelerMainRecords" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="False">
<SelectParameters>
<asp:ControlParameter ControlID="tbProdOrderNumberSearch" Name="PONumber" PropertyName="Text" Type="String" DefaultValue="" />
<asp:ControlParameter ControlID="tbSalesOrderNumberSearch" Name="SONumber" PropertyName="Text" Type="String" DefaultValue="" />
<asp:ControlParameter ControlID="rdpStartDateSearch" Name="StartDate" PropertyName="SelectedDate" Type="DateTime" DefaultValue="" />
<asp:ControlParameter ControlID="rdpEndDateSearch" Name="EndDate" PropertyName="SelectedDate" Type="DateTime" DefaultValue="" />
<asp:ControlParameter ControlID="rblIsPTS" Name="IsPTS" PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="rblHasIssue" Name="HasIssue" PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceTravelerSub" runat="server" ConnectionString="<%$ ConnectionStrings:SetoutsConnectionString %>"
SelectCommand="sp_GetTravelerSubRecords" SelectCommandType="StoredProcedure"
UpdateCommand="sp_UpdateTravelerSubRecord" UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="ProdOrder" />
</SelectParameters>
</asp:SqlDataSource>