Hi Idrees,
You need two grids and at least 3 datatable.
Grid 1 bound to DataTable 1 - This will list all the Items, nothing special about this one.
Grid 2 bound to DataTable 2 - This will list selected batch for current selected Item in Grid 1.
DataTable3 - This will hold all the selected batches for all the items in Grid 1.
Now you need to refresh DataTable 2 based on the Selected item in DataTable 1.
When the user click on a row in DataTable 1, you need to do 2 things :
1. Read all the records of DataTable 2 and sync it to DataTable 3.
2. Read all the records of DataTable 3 where the Item Code belongs to the Item selected in Grid 1 populate it into DataTable2.
Tedious, but will do the job.
When the user click Add/Update button, write the records of DataTable1 and DataTable3 into database.
Regards
Edy