Detail Grid Batch Edit

3 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    4 posts
    Member since:
    May 2015

    Posted 11 May 2015 Link to this post

    Hi

     

    I am working on Batch Edit on heirarchical grid, I am able to read the  cell values bound to master grid, but not able to read the detail grid cell values. I am binding both master and detail grid using the datasource .

     .aspx

       <telerik:RadGrid ID="radDataEntry" runat="server" MasterTableView-NoDetailRecordsText=""
                                                                        AllowAutomaticDeletes="true"   AllowAutomaticUpdates="false"
                                                                          OnItemDeleted="radDataEntry_ItemDeleted" 
                                                                        MasterTableView-NoMasterRecordsText="" EnableEmbeddedSkins="false" Skin="DV"   OnBatchEditCommand="radDataEntry_BatchEditCommand"  OnItemUpdated="radDataEntry_ItemUpdated"
                                                                        SortingSettings-EnableSkinSortStyles="false" BorderStyle="None" EnableEmbeddedBaseStylesheet="false">
                                                                       <MasterTableView ShowFooter="false" EditMode="Batch" CommandItemDisplay="Top" AutoGenerateColumns="false" Name="source" Width="100%" ExpandCollapseColumn-Visible="true"
                                                                            TableLayout="Auto">
                                                                            <ItemStyle Height="30px" HorizontalAlign="Center" />
                                                                            <AlternatingItemStyle Height="30px" />
                                                                            <BatchEditingSettings EditType="Cell" />
                                                                           <CommandItemSettings ShowAddNewRecordButton="false" SaveChangesText="Update" CancelChangesText="Cancel" />

        <DetailTables>

                   <telerik:GridTableView HierarchyDefaultExpanded="true" Name="AccountDetails" AutoGenerateColumns="False"  AllowAutomaticDeletes="true"  AllowAutomaticInserts="true" AllowAutomaticUpdates="true"    NoDetailRecordsText="<%$ Resources:Generic,NoResults %>" ShowHeader="false" EditMode="Batch"    AllowPaging="false" HierarchyLoadMode="Client">
           <ItemStyle Height="30px" HorizontalAlign="Center" />
           <AlternatingItemStyle Height="30px" />
           <BatchEditingSettings EditType="Cell" />
          <CommandItemSettings ShowAddNewRecordButton="false" SaveChangesText="Update" CancelChangesText="Cancel" />
                 <Columns>
                       <telerik:GridBoundColumn DataField="Account.AccountID" HeaderText="" Display="false" />
                       <telerik:GridBoundColumn DataField="Account.AccountNumber" ReadOnly="true"  HeaderText="" />...........

                     <telerik:GridBoundColumn HeaderText="<%$ Resources:Generic,Total %>" UniqueName="Total"
                                                                                    DataField="<%$ Resources:Generic,Total %>" HeaderStyle-Width="3%" ItemStyle-Width="3%">
                                                                                </telerik:GridBoundColumn>
                 </Columns>
          </telerik:GridTableView>
        </DetailTables>

        <Columns>
              <telerik:GridBoundColumn HeaderText="Locations" UniqueName="Source"    DataField="<%$ Resources:Generic,Source %>" HeaderStyle-Width="10%"          ItemStyle-Width="10%"   ItemStyle-Font-Bold="true">

      </Columns>
     </MasterTableView>                                   
    </telerik:RadGrid>

     

    .vb

       Protected Sub radDataEntry_BatchEditCommand(sender As Object, e As Telerik.Web.UI.GridBatchEditingEventArgs) Handles                                                                                                                                                                                                                                           radDataEntry.BatchEditCommand

            Dim newValues As Hashtable
            Dim oldValues As Hashtable
            For Each command As GridBatchEditingCommand In e.Commands     
                If (command.Type = GridBatchEditingCommandType.Update) Then
                    newValues = command.NewValues
                    oldValues = command.OldValues
                    '  Dim ID As String = newValues("ID").ToString()
                End If
            Next
         End Sub

    Here i am getting e.Commands  count as 0 when trying to read the detail grid edited cell values., I have attached a screenshot where i am able to read the 8888 value which is bind to master grid and not able to read the 9999 value which is bind to the detail grid.

     

    Please let me know to read the detail grid cell values

    Thanks

    Ramesh

  2. Ramesh
    Ramesh avatar
    4 posts
    Member since:
    May 2015

    Posted 13 May 2015 Link to this post

    Sorry, It is working , i was clicking the update button of the master grid , noticed that there is separate update button for detail grid integrated , so when i clicked the detail gird update button it is showing the updated cell values
  3. Eyup
    Admin
    Eyup avatar
    3785 posts

    Posted 14 May 2015 Link to this post

    Hi Ramesh,

    Thank you for sharing your progress with our community. Generally, you will need to enable the CommandItem of each innter table level individually:
    <telerik:GridTableView ... CommandItemDisplay="Top">

    You can also check the saveTableChanges methods for committing multiple table views:
    http://www.telerik.com/help/aspnet-ajax/grid-batch-editing.html

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top