PC Review


Reply
Thread Tools Rate Thread

accessing the ItemArray[] for a row in a dataset

 
 
Noel Marshall
Guest
Posts: n/a
 
      16th Jul 2003
I need some help. I'm beginning to think I'm a big idiot (keep those
comments to yourself). I'm building a very simple data editing application.
I fill a dataset on the form load event and tie some text boxes to the
dataset:

Textbox.Text = Dataset.Tables[0].Rows[Index].ItemArray[0].ToString();

This works fine. What I want to do is edit the data if the value in the
text box has changed:
if(haschanged)
Dataset.Tables[0].Rows[Index].ItemArray[0] = Textbox.Text;

I've also tried the .SetValue(Textbox.Text, 0) method of the ItemArray. It
says in both the MSDN documentation and in the intellisense that the
ItemArray[<pos>] property has both a get and a set...

Any help would be great!


 
Reply With Quote
 
 
 
 
New Member
Join Date: Aug 2010
Posts: 1
 
      6th Aug 2010
Try this:
Dataset.Tables[0].Rows[Index][0] = Textbox.Text;
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Substitue ItemArray with something else in a FormView staeri@gmail.com Microsoft ASP .NET 1 20th Jan 2008 08:30 PM
[.NET1.1] datarow and itemarray =?Utf-8?B?RnJlZGR5Ym95?= Microsoft ADO .NET 1 31st May 2007 06:53 AM
The ItemArray =?Utf-8?B?cm9kY2hhcg==?= Microsoft ASP .NET 3 3rd Apr 2007 04:51 PM
XML w/ string key read into Dataset changes row so item must be accessed as itemarray Ed Microsoft ADO .NET 0 1st Dec 2003 08:44 PM
ReadXML retrieving ItemArray Art Krumsee Microsoft ADO .NET 1 12th Sep 2003 03:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:00 PM.