Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > General and Integration Projects > Drag and Drop between RadGrid and RadTreeView

Not answered Drag and Drop between RadGrid and RadTreeView

Feed from this thread
  • Posted on Feb 6, 2008 (permalink)

    Requirements

    To convert code from posted project(s) Telerik online converter
    RadControls version

    Telerik.Web.UI v2008.1 515 (Q1, SP1)
    .NET version

    2.x
    Visual Studio version

    2005
    programming language

    C#
    browser support

    all browsers supported by RadGrid and RadTreeView


     
    PROJECT DESCRIPTION
    This project shows how to Drag and Drop Items from RadGrid to RadTreeView and vice-versa.

    Drag and Drop in RadGrid -> RadTreeView direction is handled by custom JavaScript logic.

    Drag and Drop in RadTreeView -> RadGrid direction is handled by using the built-in Drag and Drop functionality of the RadTreeView.

    The project also shows a sample approach to the case when RadTreeView and RadGrid are in MasterPage and ContentPage respectively.

  • Posted on Feb 6, 2008 (permalink)

    Can this be enhanced to support two-way drag and drop support? In other words, drag from a TreeView on to a RadGrid? That would obviously be harder since the Grid may have to load data based on the key to completely fill the row, but it's conceivable that a scenario with drag-and-drop would want two-way support.

    Very cool demo, though! Great work.

    -Todd

  • Nick Nick admin's avatar

    Posted on Feb 8, 2008 (permalink)

    Hi Todd Anglin,

    I agree that it would be better if the Drag And Drop can happen in both directions (RadGrid<->RadTreeView). I will try to update the project as soon as possible.

    Kind regards,
    Nick
    the Telerik team

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

  • Colceriu Radu avatar

    Posted on Feb 15, 2008 (permalink)

    I'm looking at that example since yesterday evening, still trying to find out what the relevant parts of it are. Some documentation would have been really nice. Also the code is horribly formatted and absolutely not commented.

    The next thing is, that I first have to upgrade my current project to this new Version, which doesnt seem to be quite easy, since the whole structure changed. Another ordeal with telerik controls.

  • Nick Nick admin's avatar

    Posted on Feb 18, 2008 (permalink)

    Hi Colceriu Radu,

    I added some comments to the code used in the project attached to this thread. If something remains unclear, please let me know. I will try to provide further clarifications if needed.

    Regards,
    Nick
    the Telerik team

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

  • Posted on Mar 13, 2008 (permalink)

    Nick-

    Any update on the progress updating the demo to show the RadTreeview to RadGrid drag-and-drop operation? I've talked to more people recently that would love to see this two-way operation.

    Thanks-
    Todd

  • DENIS LABERGE avatar

    Posted on Apr 2, 2008 (permalink)

    is it possible to modify this sample to allo dragging multiple rows from the grid to the tree?

  • charles avatar

    Posted on May 12, 2008 (permalink)

    I too would like to see drag and drop of multiple grid rows onto a treeview node. Thanks.

  • Simon Simon admin's avatar

    Posted on Jun 3, 2008 (permalink)

    Hello there,

    @Todd:
        I have updated the project to show both Drag and Drop directions.

    @DENIS LABERGE, charles:
        Currently, we are working on a CL which will illustrate dragging and dropping of multiple rows from RadGrid to RadTreeView (using the built-in drag and drop functionality of the RadGrid). Hopefully, the project will be published very soon.

    Any comments/feedback are appreciated.

    Regards,
    Simon
    the Telerik team

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

  • Simon Simon admin's avatar

    Posted on Jun 4, 2008 (permalink)

    Hello again,

    A CL Project showing Multi Row Drag and Drop from RadGrid to RadTreeView has been published.

    You can check it out here.

    Regards,
    Simon
    the Telerik team

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

  • Christian avatar

    Posted on Sep 21, 2008 (permalink)

    Hi,

    what are the steps to use your sample in the way that treeview is on the masterpage and grid inside a content area?

    Thanks!

  • Simon Simon admin's avatar

    Posted on Sep 24, 2008 (permalink)

    Hello Christian,

    This could be achieved in various ways but the basic idea is the same - the correct RadGrid and the MasterTableView IDs should be available on the client. I have modified the sample project to illustrate one possible implementation.

    Please download it and see it for the details.

    Greetings,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  • Peter avatar

    Posted on Feb 25, 2009 (permalink)

    Hi

    How do I get the RadAjaxManager1_AjaxRequest Method executed if I have only a AjaxManagerProxy on my Page? There is no property "OnAjaxRequest" on the proxy. I found some kind of solution here: http://www.telerik.com/community/forums/aspnet-ajax/ajax/radajaxmanagerproxy-issue.aspx but I don't get it working for this drag-drop function.

    Thanks for help!

  • Posted on Feb 25, 2009 (permalink)

    Hey Peter-

    Assuming your goal is to write some server-side code that handles a Ajax event fired by JavaScript on a ContentPage (with a AjaxManager on your MasterPage, and a AjaxManagerProxy on your content page), you can use this snippet:

    //In your ContentPage OnPageLoad 
    protected void Page_Load(object sender, EventArgs e) 
        //Get reference to AjaxManager (from Master) 
        var manager = RadAjaxManager.GetCurrent(this); 
     
        //Create a new delegate to handle the AjaxRequest event 
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(YourContentPage_AjaxRequest); 
     
        //Add your ajax settings programmatically (with ref to Master manager) 
        manager.AjaxSettings.AddAjaxSetting(manager, this.controlToUpdate); 
     
    //Handle the Ajax event in your ContentPage code behind 
    private void YourContentPage_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        //Optionally process supplied event arg 
        switch (e.Argument) 
        { 
           case "SomeEventArgument"
           //Do something 
           break
        } 

    This allows you to handle your ajax requests in your content page code when they're fired from the client, like this:

    function someJavaScriptFunction() { 
       //Get reference to RadAjaxManager on page 
       if (radManager == null
           radManager = $find('<%= RadAjaxManager.GetCurrent(this).ClientID %>'); 
     
       //Fire ajax request (optionally pass an event arg value) 
       radManager.ajaxRequest("SomeEventArgValue"); 

    Hope that helps!
    -Todd

  • Rajesh avatar

    Posted on Mar 5, 2009 (permalink)

    I am working with latest trial download of ASP.Net controls. I need functionality to drag and drop from radgrid to radtreeview control. I downloaded this solution from the forum but am getting this error:
    Unable to cast object of type Telerik.web.ui.radgrid to Telerik.web.ui.gridtableview

    Can you please help with that?
    Thanks,
    -raj

  • Simon Simon admin's avatar

    Posted on Mar 5, 2009 (permalink)

    Hi Rajesh,

    Please open a formal support ticket and send us a runnable project where the issue could be clearly observed. We will examine your code and will provide you with a solution or a workaround.

    Thank you.

    Best wishes,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

Back to Top

Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > General and Integration Projects > Drag and Drop between RadGrid and RadTreeView