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?
Printable View
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?
For more info about datagrid check this site. http://www.syncfusion.com/FAQ/Window...4c.aspx#q1145qCode:'Double click event of your datagrid
listbox1.items.add(datagrid1.item(datagrid1.currentcell.rownumber,0).tostring());
0 represents the first column of your 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.