473,394 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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(myDataset.Tables("tblAdressbokk"),
"", _

"personID", DataViewRowState.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.SelectedItem)

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 3634
Hi,

Dim drv as DataRowView = myDataView.Item(RowIndex)

drv.BeginEdit()

drv.Item("FirstName") = "Joe"

drv.EndEdit()

Ken

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

"Able" <ab**************@portalen.no> wrote in message
news:sM********************@news2.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(myDataset.Tables("tblAdressbokk"), "", _

"personID", DataViewRowState.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.SelectedItem)

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
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...
0
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...
14
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...
4
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
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...
0
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...
2
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...
7
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.