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
Solved

create new datarow

Posted on 2006-11-01
1
1,335 Views
Last Modified: 2012-06-27
hi

i have a populated array of datarows.  

i want to create a new datarow add a string to it.

then i want to increase the size of the array by 1 and
add the new datarow to this position in the existing array of datarows.

NB - i have to do this via a datarow array - cant avoid it.

can anyone help?

thanks
0
Comment
Question by:cocosteel
1 Comment
 
LVL 11

Accepted Solution

by:
Mihai Stancescu earned 300 total points
ID: 17850930
If the length of the datarow array permits you to insert an other item then you can use the method SetValue.

ex:

DataRow[] dr = new DataRow[] {5};

//if you have filled up the array up to the 4 position try this
dr.SetValue(newDataRow, 5); // make sure that this value is less then the length of the array or else you'll get an exception.

Regards,
Mishu
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What can cause the styling on a .NET site to not be found? 17 29
C# Gridview 1 47
Winforms -- Capture CTRL+SHIFT+D at the form not working? 3 25
MailAddress in vb 4 29
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.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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