Rabu, 04 Februari 2009

Mental block on tableadapter and datagridview RESOLVED vb 2005


I'm afraid I'm having a mental block on this one.

I have a dataset with two tables. One iahve created a table adapter called tblPHCR_Register_AuditTableAdapter. I have added a query which filters the dataset by Id. I want to add a datagridview to my form bound to this filtered dataset. The parameter is a textbox value on my form RegId. I just can't remember how to do it........tblPHCR_Register_AuditTableAdapter appears in the toolbox....


the way I normally do it is as follows


Code:
'stronglytyped dataset called mydataset
dim mDS as New mydataset
'datatable called mytable in mydataset
dim mtable as new mds.mytable
dim ta as new mydatasettableadapters.tblPHCR_Register_AuditTableAdapter
'fill the datatable with the results from the tabeladapter
ta.fill(mds,textbox1.text)
'bind datagridview to the datatable
datagridview1.datasource = mtable



air coded so there may be a mistake, but hopefully it will give you the picture

-----------------------------------------------------------------------------------------------------------------
If your message has been resolved, edit your first post and Click the [RESOLVED] radio button

Edited by - Jrogers on 4/30/2008



source :http://www.vbcity.com

-------------------------------------------------------

Trik Gambar Bergerak

Trik Gambar-dimouse

Trik hapus pwd mysql

Trik insertin to db

Trik jadi root dilinux

Trik jam-distatus-bar

Trik Koneksi-ke database

Trik Koneksi-msql-php

Trik lihat-database-mysql

Trik membahas-fungsi-else

Trik member-area


How To Add Controls

How to play audio vb.net

How to move VisualStudio.NET

How To Print vb2005

Remove Item Importing Textfile

koneksialldb

Loading image files

load multi image

looping vb2008

Managing SQLServer2005