filling values into dataset

Posted on 2005-03-16
Medium Priority
Last Modified: 2010-04-16
Hi there,
I created a DataSet manually like this:

DataSet myDataSet = new DataSet("NewDataSet");
DataTable tblUserData = new DataTable("tblUserData");
tblUserData.Columns.Add("User_Name", typeof(string));

How can I add manually a value to the column "User_Name"?

Thanks heaps

Question by:ccoe1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 22

Accepted Solution

Mohammed Nasman earned 200 total points
ID: 13554146
DataSet myDataSet = new DataSet("NewDataSet");
                  DataTable tblUserData = new DataTable("tblUserData");
                  tblUserData.Columns.Add("User_Name", typeof(string));

                  DataRow rw;
                  rw = tblUserData.NewRow();
                  rw["User_Name"] = "Mohammed";
                  // just add this for testing
                  dataGrid1.DataSource = tblUserData;

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question