Accessing all the rows from a datagrid at save button 
Author Message
 Accessing all the rows from a datagrid at save button

When displaying a datagrid either I am allowing to add new
rows or editing rows.  

When my save button is activated, I want to be able to
make decisions on what rows have been changed or added so
I can update my sql table.

I have been able to populate my grid with a dataset and
have been able to add a new row but I have not been able
to work with all the rows at save.
Could some one be kind to guide me on this?
Thanks!
Nancy.



Mon, 27 Dec 2004 00:00:00 GMT  
 Accessing all the rows from a datagrid at save button
I got the answer from this one.  
Example:
     Dim dtHold As DataTable = objDS.Tables("holds")
        Dim i As Integer
        For i = 0 To dtHold.Rows.Count - 1
            MsgBox(dtHold.Rows(i)("seq"))  
            MsgBox(dtHold.Rows(i)("holdtypecode"))
        Next

Quote:
>-----Original Message-----
>When displaying a datagrid either I am allowing to add
new
>rows or editing rows.  

>When my save button is activated, I want to be able to
>make decisions on what rows have been changed or added so
>I can update my sql table.

>I have been able to populate my grid with a dataset and
>have been able to add a new row but I have not been able
>to work with all the rows at save.
>Could some one be kind to guide me on this?
>Thanks!
>Nancy.

>.



Mon, 27 Dec 2004 01:20:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Auto Saving an editable datagrid without click the save/update grid button

2. Save & Cancel button for DataGrid

3. Add row to datatable from datagrid without leaving current row with cursor

4. Autonumber key from ACCESS database for new row into Datagrid

5. How do I set the Datagrid row to be same size as the datagrid window

6. Add Button to a row by row data display

7. Need some help with DataGrids (DataGrid-->DataGrid, DataGrid-->Dataset, DataGrid-->XML)

8. How to read Access Table row by row?

9. Know datatable row number of a datagrid line ?

10. How to delete a row in a datagrid.

11. datagrid row update when not visible in the grid

12. Datagrid and Rows.Add

 

 
Powered by phpBB® Forum Software