Datagrid question

  • Thread starter Thread starter Scott Meddows
  • Start date Start date
S

Scott Meddows

I know how to put data INTO a datagrid. If I want to get data out of the datagrid how do I do that?

I've read somewhere about a currency manager? Is that the correct way? Anyone have some simple code or links for reference?

Thanks

Scott
 
Scott Meddows said:
I know how to put data INTO a datagrid. If I want to get data out
of the datagrid how do I do that?

I've read somewhere about a currency manager? Is that the correct
way? Anyone have some simple code or links for reference?


Already had a look at the docs?
http://msdn.microsoft.com/library/en-us/vbcon/html/vboriWindowsFormsDataArchitecture.asp


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
That really doesn't give me the information I need.

What I need to do it pull the value from a column in the selected row and pass it to a procedure to delete the record. Then delete
the record from the underlying dataset.
 
What Data do you want to put into you datagrid? is it from a Access
Database, Sql Database of other format?

What data do you want out of the datagrid? Single rows, coloums or do you
want to run a perticular query on the Data?

Have you read anything on Datasets? using them to fill your data table?

Ta
MCN

Scott Meddows said:
I know how to put data INTO a datagrid. If I want to get data out of the datagrid how do I do that?

I've read somewhere about a currency manager? Is that the correct way?
Anyone have some simple code or links for reference?
 
Yes, I can pull a dataset and populate the datagrid. That isn't a problem at all. I just need to know how to reference a selected
row in the datagrid.
 
Scott Meddows said:
That really doesn't give me the information I need.

What I need to do it pull the value from a column in the selected row
and pass it to a procedure to delete the record. Then delete the
record from the underlying dataset.

I posted the link because it is /the/ starting point for information about
data bound WinForms and I assumed it contains what you're looking for. I'm
afraid if it doesn't.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi,

Dim cm As CurrencyManager
cm = CType(Me.BindingContext(DataGrid1.DataSource), CurrencyManager)

Dim dr As DataRow
dr = DirectCast(DataGrid1.DataSource, DataTable).Rows(cm.Position)


dr.Delete()

Ken
----------------
 
Back
Top