473,770 Members | 5,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataView edit?

Dear friends

Two of the columns in the table tblAdressbook is the field "FirstName" and
the field "personID". The table is loaded in the dataset myDataset and is
sorted by "personID" in the dataview myDataView as this:

Dim myDataView As DataView = New DataView(myData set.Tables("tbl Adressbokk"),
"", _

"personID", DataViewRowStat e.CurrentRows)

So I am searching the DataView for a spesific row and retrieving the
rowindex as this:

Dim RowIndex As Short

RowIndex = MyDataView.Find (ListBox1.Selec tedItem)

The field "FirstName" in this spesific row is "Frank", but how do I edit
this field to "Joe"?

Somebody knows?

Regards Able
Nov 20 '05 #1
1 3649
Hi,

Dim drv as DataRowView = myDataView.Item (RowIndex)

drv.BeginEdit()

drv.Item("First Name") = "Joe"

drv.EndEdit()

Ken

---------------------

"Able" <ab************ **@portalen.no> wrote in message
news:sM******** ************@ne ws2.e.nsc.no...
Dear friends

Two of the columns in the table tblAdressbook is the field "FirstName" and
the field "personID". The table is loaded in the dataset myDataset and is
sorted by "personID" in the dataview myDataView as this:

Dim myDataView As DataView = New DataView(myData set.Tables("tbl Adressbokk"), "", _

"personID", DataViewRowStat e.CurrentRows)

So I am searching the DataView for a spesific row and retrieving the
rowindex as this:

Dim RowIndex As Short

RowIndex = MyDataView.Find (ListBox1.Selec tedItem)

The field "FirstName" in this spesific row is "Frank", but how do I edit
this field to "Joe"?

Somebody knows?

Regards Able

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3310
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit the selected lie item at which case I would pop up a separate dialog box to do so, in the debugging code, the dataview.count would return 0. I get a error message because I tried to get values out of a dataview that holds 0 items. Does anyone...
0
741
by: grolms | last post by:
I must recreated dataview . I am in the designer insert dataview set datasource ... And I set before DataBind datasource on the dataview ... How I recreated dataview. I have dataview in class member ... thanx >-----Original Message-----
14
9878
by: Able | last post by:
Dear friends Dim myDataView as DataView = New DataView(dsData.Tables("tblCustomers")) myDataView.RowFilter = "City = 'London'" My question is how to loop through all rows in myDataView and edit the field fldZipCode so fldZipCode = "9800" Regards Able
4
15104
by: Bruce A. Julseth | last post by:
I'm new to VB.NET and just gettng into database "Learning." How do I decide if I need a DataTable or a DataView. Thanks... Bruce
10
1956
by: Marc R. | last post by:
Hi all, I edit records using a form that have multiple control bind on Dataview, But I don't want to update right always to database, I would like to delay until all Changes (add all new record using a form or edit various existing records) This way I could minimize transaction on server..
0
1328
by: ME | last post by:
I have an application that displays data in a DataGridView. The data is in a DataView that is sorted and at times filtered. One of the columns I have in the dataview is a boolean field called "selected". Typically the DataView will either be sorted or filtered by this column. However when the user toggles the row value for this column (and others as well) in the DataGridView and ends the edit the data in the dataview changes, causing...
2
11229
by: ewingate | last post by:
What is the real difference between the DataView and the DataGridView? Is the DataView even a control or is it merely a class? With methods that allow you to edit rows and columns it seems like it would be a control that you could drag and drop on a form in the designer but I cannot find the DataView control in the toolbox. I have used a DataGridView before but I was wondering if DataView has better functionality. Thanks!
7
5001
AHayes
by: AHayes | last post by:
I've been searching online for a while now with no luck, so I'll try the friendly folk here. _The Problem I have a dataset/dataview that's getting its data from an XML file (which we're using sort-of like a database). I'm a little more used to contacting SQL servers instead of XML files, but have managed to read from the XML file and read/display the data. I thought I was able to change the data (from a form) as well, but realized the...
3
5394
by: =?Utf-8?B?cG1jZ3VpcmU=?= | last post by:
I have a dataset with 3 tables -- 2 Parent tables and 1 table that is a child table of both the parents. I create a dataview on the child table and set the rowfilter to a value which filters the child based on values in both parent tables. When I edit the parent tables the edit is not reflected in the dataview.count property. How can I force the dataview to refresh following parent table edits? For example: Parent1
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.