Solved

create new datarow

Posted on 2006-11-01
1
1,333 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

805 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