how passing the data from one datagrid to another ????? help !!!
To all Experts in programming (VB.NET) .......
i was design 2 GUI, one is SalesOrder and another is DeliveryOrder.
then inside this 2 GUI, i have an Datagrid which bind the SalesOrder Table in to the SalesOrder GUI and DeliveryOrder Table into the DeliveryOrder GUI. And i have an Button which caller "TRANSFER" have an function when i click it. the highlighter record in the SalesOrder Datagrid will transfer all the Information about that particular SalesOrder detail into the DeliveryOrder dataGrid which inside the DeliveryOrder GUI.
by using this function is because it can pass all the infor from the SalesOrder to the DeliveryOrder. so that the user only transfer the data instead of rekeyin all the same information from the SalesOrder into the DeliveryOrder again.
but now i face a problem is how am i going to write the code in the "TRANSFER" button in order to allow the data to be transfer from SalesOrder to DeliveryOrder table ?????
headache????? please help me ????
is that possible to do such function in my system??????
regards,
cOe
Re: how passing the data from one datagrid to another ????? help !!!
some points are not clear about what exactly u want to do?
1> does the information u want to transfer contains some runtime calculated fields which are not there already in the table?
If this is not the case u can use directly the table joins.
2>The 2 GUIs are in the application ?
In that case get the rows for salesorder by Gridview.SelectedRows in a array of rows ans send it to the function.
Shweta
Re: how passing the data from one datagrid to another ????? help !!!
actually dont have any calculation involve when passing the data.....
take for an example.......
now i have 2 GUI, one is Sales Order and second is Delivery Order.
and i want to pass the Sales Order record in the Datagrid in Sales order GUI to the Datagrid in the Delivery Order GUI. because basically the Delivery Order contains the information of Sales Order. and to make the user convenient, i juz let them pass the information from sales order to delivery order.
the user do not need to reenter the same information twise time.
they juz need to highlight the Sales Order record in the datagrid. and maybe press the "Pass to Delivery Order" option button. then particular sales order record will automatically copy to the Delivery Order table and display out in the Delivery Order Datagrid in the Delivery Order GUI.
no calculation are involve basically.
is that possible to do so??
before this, i have see one example to process like what i am describe above.
but i unable to found back the sources already.....
any resources that can provide to me?????
help!!!!
thanx!!!!
regards,
cOe
Re: how passing the data from one datagrid to another ????? help !!!
Assuming your datagrids displays the contents of datatable1 and datatable2, could you use:
datatable2.ImportRow(datatable1.Rows(i))
where i the the selected row in the datagrid
then display the amended datagrid
DataGrid2.DataSource = datatable2.DefaultView
and remove the row from datatable1 and display the new datagrid
Not tested, but an idea