This is a migrated thread and some comments may be shown as answers.

Drag and Drop between two radgrid

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 06 Dec 2010, 11:59 PM
I have created two radgrid(Same as drag and drop radgrid demo) and able to drag and drop each item in both direction. Now, first radgrid is binding during page load and getting values. But I want to bind it on a button click event. Can I create a datatable instead of Pendingorders on that button click event. Anybody can help.
thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Dec 2010, 12:07 PM
Hello Ben,

In order to achieve this make the grid's visibility as 'False' in initial PageLoad. Then set the Visibility of grid as 'True' in the ButtonClick event and Rebind the grid.
C#:
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            grdPendingOrders.Visible = false;
        }
    }
   protected void Button1_Click(object sender, EventArgs e)
    {
        grdPendingOrders.Visible = true;
        grdPendingOrders.Rebind();
    }
   protected void grdPendingOrders_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
         grdPendingOrders.DataSource = PendingOrders;
    }

And yes, it is possible to bind the grid using datatable on that Button click event.

Thanks,
Princy.
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or