0

Dear All

i need help how to insert data into sql database form a datagrid...

this is the example....

i have view data from tabel sales in a data grid

product name sales jan sales feb sales mar

MILK 10 15 20
Biscuit 7 6 9
Tea 5 15 30

from that kind of data i wouldlike to input it to table target..so i will edit some of
the data then i will save it to tabel target...

i want to just klik one button and will save all data in that datagrid to tabel target


please help me :'(

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by pritesh2010
0

Steps:

1. Read Items collection of DataGrid.

foreach (DataGridItem  row in DataGrid1.Items)
   {
        
   }

2. Use ADO.NET data provider to insert each row into a table.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.