Solved

create new datarow

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now