Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Populating DataGridView with new information....

0 views
Skip to first unread message

Superfreak3

unread,
Jan 8, 2008, 12:19:29 PM1/8/08
to
I have a DataGridView that is populated with info from a DataSet. I
actually created my project in VS 2003, but converted it to 2005
because of the autosize property of the DataGridView. Anyway, the
connection, adapter and dataset were all generated via the wizards.

I would like to know what code I could add to change the information
displayed in the DataGridView. I'm pulling information from an Access
Database and for example, the View may initially display columns...

Name Responses to Question 2

I basically want to call the form and display various question
responses based on the question selected. I currently can get the
form to display the Name column when I call the form from the Question
3 button, but can't get it to display those responses.

Here is what I am currently toying with:

Select Case mintTrigger
Case 2
'Question2DataSet1BindingSource.DataSource =
Question2DataSet1
OleDbDataAdapter1.SelectCommand.CommandText = "SELECT
Name, Ques2 FROM Summaries where Ques2 <> ""No Answer"""
OleDbDataAdapter1.Fill(Question2DataSet1)
Case 3
Question2DataSet1.Clear()

DataGridView1.DataSource =
Question3DataSet1BindingSource
OleDbDataAdapter1.SelectCommand.CommandText = "SELECT
Name, Other3 FROM Summaries where other3 <> ""N/A"""
OleDbDataAdapter1.Fill(Question3DataSet1)

End Select

Should I select all fields in the DataAdapter or are the above select
statements sufficient.

It's probably obvious that I don't know what I'm doing, but again, I
just want to display response summaries on a form and want to be able
to use a single form if possible. Do I need various datasets for each
question or can a single dataset be cleared each time.

Any code snippets to get me to Button1 click - Name and Answers 1
displayed, Button2 click - Name and Answers 2 displayed would be
greatly appreciated! As you can see from above, there are some <>
filters in my select statements.

Thanks!

Superfreak3

unread,
Jan 9, 2008, 2:15:28 PM1/9/08
to

I can tell from the names returned that my question 3 sql query is
executing properly.

0 new messages