How to copy selected rows from one RadGrid to another radGrid ?

5 posts, 0 answers
  1. Ramesh kumar Kuppusamy
    Ramesh kumar Kuppusamy avatar
    36 posts
    Member since:
    Apr 2010

    Posted 23 May 2010 Link to this post

     

    I want to Copy the selected rows from one grid to another.

    I used the following code but the data not getting bind in to the second grid.

    Dim
    selItems As GridItemCollection = grdResult.SelectedItems
    RADGrid1.DataSource = selItems  

    RADGrid1.DataBind()

     

     

     

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 May 2010 Link to this post

    Hello Ramesh,

    One suggestion would be making use of drag and drop feature of grid records as shown in the demo.  

    If you do not want to have the drag-drop feature, you can disable it, and have the control postback upon selecting/deselecting the grid rows. Then, from the server SelectedIndexChanged event, you can loop through the SlectedItems, and add it to the other grid's datasource.

    I hope these suggestions help.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pams
    Pams avatar
    61 posts
    Member since:
    Sep 2010

    Posted 10 Sep 2010 Link to this post

    Hi,
    I have same problem. I have a radgrid1 which gets data from object datasource and has paging option set. When we select some rows in radgrid1 and click a button the rows of radgrid1 in that page should be copied to other radgrid i.e radgrid2. Then go to next page of radgrid1 and select some rows and click button to add rows to radgrid2. Could anyone pls give the codesnippet which would be very great.

    Thanks in advance
  5. Hapa
    Hapa avatar
    4 posts
    Member since:
    May 2013

    Posted 07 Jul 2014 Link to this post

    Is there any example of how to move selected rows (GridClientSelectColumn) to another radgrid on button click? Both radgrids are on the same page.
    Similar as http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/rows/drag-and-drop/defaultcs.aspx but not drag and drop but all selected items on button click.

    Thanks
  6. Eyup
    Admin
    Eyup avatar
    3012 posts

    Posted 10 Jul 2014 Link to this post

    Hi Hapa,

    I am sending a sample RadGrid web site to demonstrate how you can access the unique IDs of the selected items. Then, you can execute a custom logic to update the database of the second grid and rebind it afterwards.

    Hope this helps.

    Regards,
    Eyup
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017