Adding child records in hierarchical grid through MasterTableView CommandItem

Thread is closed for posting
7 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 26 May 2006 Link to this post

    Requirements

    RadGrid for ASP .NET version

    RadControls for ASP .NET AJAX version
    3.2.0 and later


    2008.1.415 and later
    .NET version

    2.0 and later

    Visual Studio version

    2005 and later

    Programming language

    VB NET

    Browser support

    all supported by RadGrid for ASP .NET


    all browsers supported by RadControls for ASP .NET AJAX


     
    PROJECT DESCRIPTION
    This demo shows how to add child records (using the built-in insertion mechanism of r.a.d.grid) to expanded detail tables. The example presents two level hierarchy and single expand - thus you can identify uniquely the child table in which to display the insertion form.

    Feel free to extend the example with custom code if your scenario is more complex.
     
  2. 7B0A2AC8-5885-4605-BD07-CEB53A929266
    7B0A2AC8-5885-4605-BD07-CEB53A929266 avatar
    3 posts
    Member since:
    May 2006

    Posted 26 May 2006 Link to this post

    Hi Stephen,
    thanks you this worked for me.
    I've addopted it to my case, cause I have "Add child" in the each item, so the code looks like this:

            Private Sub RadGrid3_ItemCommand(ByVal source As System.Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles RadGrid3.ItemCommand

                If (e.CommandName = "InsertSubItem") Then
                    Dim editedItem As GridDataItem = CType(e.Item, GridDataItem)
                    editedItem.Expanded = True

                    editedItem.ChildItem.NestedTableViews(0).IsItemInserted = True
                    editedItem.ChildItem.NestedTableViews(0).Rebind()
                End If

            End Sub

    Thanks again

     

  3. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 26 May 2006 Link to this post

    Hi Igor,

    I am glad that the solution suits your needs.

    Best,
    Stephen
    the telerik team
  4. E28DC77D-6C95-49EF-BCEC-8BF0223B760F
    E28DC77D-6C95-49EF-BCEC-8BF0223B760F avatar
    1 posts
    Member since:
    Jun 2006

    Posted 22 Jul 2006 Link to this post

    This does not work, after selecting "Add Master" or "Add Child", then entering the data and pressing insert, nothing happens, no data is inserted or created?  What's the deal?
  5. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 24 Jul 2006 Link to this post

    Hi Vincent,

    The sample project demonstrates how to display initially the insertion form for child records when clicking a button inside the master table command item. The actual insert operation is not included in the demo - please excuse us if the title/description of this thread is somehow misleading.
    The target of this application is to present the technique how to insert child items from the parent table command area using the grid bubbling mechanism.

    To understand how to perform the real insert operation please follow this link.

    Kind regards,
    Stephen
    the telerik team
  6. 6093C0B8-B2E1-44A5-B689-AE32DB8AA3EC
    6093C0B8-B2E1-44A5-B689-AE32DB8AA3EC avatar
    160 posts
    Member since:
    Apr 2008

    Posted 18 Jun 2009 Link to this post

    Hi,

    dead links in post above me..!
  7. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 18 Jun 2009 Link to this post

    Hello Nikolai,

    I updated the links to point to the relevant article in the RadGrid for ASP.NET AJAX online documentation. Thank you for notifying us about them.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.