Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Novice Problems
 

Novice Problems

Hi All, 

I am trying to do the following in a WinForm

I need to run a stored procedure, read the values for each row, and then send an email.

the columns being passed are 
Name of Attachment
Name of the Receiver 
Subject

So, I need to read each row, pick the attachment , pick the name of the person, and the subject and send the email.

It would seem pretty simple in WebForms but with WinForms, i can't seem to understand how to go about it. 

Is there any reference or assistances on how i can go about it.

I did try to populate a DataGrid, except that when i see the datagrid, it shows a small plus sign, then the name 'table' and then when i click on the link, it then display the dataset in the datagrid.

I am looking for help.

Thank You
MigrationUser 1  Thursday, April 08, 2004 10:43 AM
I'm thinking this might help a little

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2225&lngWId=10

also you must always set the datasource to dataset and the datamember to the datatable in the dataset. 

Now to select the current row that the datagrid is on you would do in the double click event of the datagrid something like.

Dim CM as currencymanager = ctype(me.bindingcontext(me.datagrid1.datasoruce,me.datagrid1.datamember),currencymanager)
if cm.position > 0 then
Dim DRV as datarowview = ctype(cm.current,datarowview)
'then use the drv to gain the data
Dim Name as string
name = drv.item("NameColumn")
end if

Hope this helps.
MigrationUser 1  Tuesday, April 13, 2004 12:45 AM

You can use google to search for other answers

Custom Search

More Threads

• is it Concurrency violation a bug?
• How to implement transaction?
• How to use key Enter instead of Tab in DatagridView
• error adding new data source
• How to access a row during population of a datagrid from a dataset
• Generate barCode
• Error when commiting the Row to the Original Datasource.
• Event for Column Resizing
• datagrid tablestyle COPY problem
• Databindings mastered by a textBox...