Tuesday, June 12, 2012

Add new column and its value in Dataset in c#


 dsLetters.Tables[0].Columns.Add(new DataColumn ("ClientRequirement"));
            foreach (DataColumn item in dsLetters.Tables[0].Columns)
            {
                if (item.ToString() == "ClientRequirement")
                {
                    dsLetters.Tables[0].Rows[0]["ClientRequirement"] = clientNeed.ToString();   
                }
            }

No comments:

Post a Comment