|
-
Oct 12th, 2005, 11:16 AM
#1
Thread Starter
Member
Add Item from one DataGrid to Another DataGrid
Hey Guys im woriking with ASP.NET (C# but VB.Net help is welcome)
i have a DataGrid and i want to select an item of that grid and when selected add that item to another DataGrid or to a ListBox
who can help me there?
-
Oct 12th, 2005, 08:59 PM
#2
Re: Add Item from one DataGrid to Another DataGrid
Code:
'Double click event of your datagrid
listbox1.items.add(datagrid1.item(datagrid1.currentcell.rownumber,0).tostring());
0 represents the first column of your datagrid.
For more info about datagrid check this site. http://www.syncfusion.com/FAQ/Window...4c.aspx#q1145q
-
Oct 12th, 2005, 09:42 PM
#3
Re: Add Item from one DataGrid to Another DataGrid
Unfortunately the WebForms DataGrid is a different beast to the WinForms DataGrid, so that link to the Windows Forms FAQ won't be much help.
Whether WebForms or WinForms, if you have bound data to your DataGrid you need to work with the underlying data source, so you would have to create a new row in the DataTable that serves as data source for the target grid and copy the values from the fields in the selected row of the data source of the source grid.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|