Visual Studio Development Bookmark and Share   
 index > Visual C# Express Edition > dataset.datatable to DataSource to DataGridView
 

dataset.datatable to DataSource to DataGridView

If I had Visual Studio I would be "hey, hey break out the champagne!" by now.  But....I am working with C# Express (an excellent IDE that is free :) )

I have an SQL database that C#Express does not support.  I have a DataSet I created from SQL queries.

I want to import this DataSet into A datasource so i can use it in a gridview (along with all the cool grid view features).  What do I do?


namespace


 Dataset {
public partial class Database1DataSet {
}
}



The below code works if I want to view the data in single CSV file....I am guessing that this is NOT the way to go

  using System.Data.sql;

 

            CSV_Parser objds = new CSV_Parser();

            DataSet ds = objds.getCSVData(@"c:\mydata.csv");

            dataGridView1.DataSource = ds.DefaultViewManager;

            dataGridView1.DataMember = "tableOfData";

many thanks for help!

CountryStyle (becuase Tim Hortons was taken)
CountryStyle  Tuesday, October 06, 2009 8:30 PM
updated my OP because I was not asking right.

I also inserted working code to get a CSV file in dataview....not really relevant but it shows I am trying.

CS
CountryStyle  Wednesday, October 07, 2009 1:30 AM
Hi,

What is the problem?

What are the contents of ds:

            CSV_Parser objds = new CSV_Parser();

            DataSet ds = objds.getCSVData(@"c:\mydata.csv");

Harry

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Harry Zhu  Friday, October 09, 2009 3:36 AM

Hi,

For the
questions relating to asp.net ,please post to: http://forums.asp.net/.

Thanks,
Harry


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Harry Zhu  Tuesday, October 13, 2009 5:17 AM
Hi Harry,

thanks for replying, sorry for not seeing your response sooner.

I abandoned c# for this project and moved it to another platform.

With Regards,
Country Style
CountryStyle  18 hours 31 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• ReportViewer Add-In (Redistributable Package) not adding ReportViewer control to Toolbox...
• ReadOnly Vs Enabled
• bool type conversion
• Where to keep User ID and Password if the user choses to check remember my user name and password
• couldn't adding tab pages in my tabbed web browser
• Value can not be null. Parameter name: serviceInstace
• Look for in MSDN
• c++/CLI dll for c#
• listview
• check open form