473,657 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding dataset to listview

Bom
Hi,

I bound a dataset to a listview (I used example of Lothka).
I have also a button delete. When I select a row in the
listview and I push delete-button I can delete the row in
the dataset as follows :
ds.Tables[0].Rows[Convert.ToInt32 (item.Index)].delete().
And then I rebind my listview to the dataset.

But working with item.index is not right.
1. When I am deleting then the 3 row. In the dataset he
deleted the 2e row.

So : listviewItem.in dex and the index for the rows of the
dataset doesn't match anymore after my first delete.

Same problem when I sort the listview, then there is no
match between both indexes.

What is the best way to resolve that problem?
Thanks
Bom
Ps : is it possible when I access the newsgroup C# and I
want to go to the next page . He says "newsgroup not
available".
Nov 15 '05 #1
0 2015

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

Similar topics

13
4300
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying structure of the datasets, i.e lots of child tables etc, I cannot use bindingcontext
0
2983
by: geng | last post by:
Hello everyone ! As you can see I am new to this. It is also my first post! I have a visual c# pocket pc form with a listview in it. The listview has one column at the moment and it is populated by using a textbox and a button. I am trying to save to contents of the listview to an Xml file. I have the following code and the debugger gives me no errors, but when I am trying to save on the pocket pc or the emulator I get...
0
1343
by: alan | last post by:
Dear all, I'm trying to do a data binding for a ListView and I rewrite the code from some example but there is a error while I execute. Can anybody tell me what's wrong with it?? Thank you!! Alan Error message is
3
3789
by: alan | last post by:
What I would like to do is like that, a ListView data binding with a dataset which list all records of a table( for example the table list all the information of a student student_id, name, tel....etc). Besides, there are some textbox will display the student information when I click on one of the record on the ListView so that I can update the records in the textbox. I can do the data binding for the ListView and the dataset, butI don't...
4
17091
by: Lasse Eskildsen | last post by:
Hi, Is there an easy way to load the content of a dataset into a listview with a few columns? Thanks! -- Lasse
2
4528
by: bbepristis | last post by:
Hey all I maybe way off base here but I am trying to do a select * from 'csv file' then take the return data and insert it into textboxes for example column company into companytxt.text ext... here is the code i have so far but how do I bind this together? I am fairly new to vb.net so please be understanding... here is my code: Dim conStr As String = "PageTimeout=5;Extensions={txt,csv,tab,asc};MaxScanRows=25;DefaultDir=C:\Documents" & _...
3
1644
by: Peter | last post by:
OK, so in addition to the problem I mentioned before (c.f. "Data Binding to Textbox"), I realized that my comboboxes are not really bound to the internal data set. They are just set to manually change to reflect whatever the selected row's foreign keys are. So the question is, how can I bind the SelectedItem of a combobox, which is filled with DataRowView objects from its bound table, to a field in whichever row of a dataset happens to...
1
9826
by: Monty M. | last post by:
Does anyone know how to perform two way data binding between a combo box and a listview. The listview is bound to a dataset table in code: Binding Bind = new Binding(); DataTable dt; Field_LV.DataContext = dt; Field_LV.SetBinding(ListView.ItemsSourceProperty, Bind);
0
1159
by: Andy | last post by:
Hi, I have the following Xaml.. I'm not sure why I can't get the context menu item's to bind to a property of the window. Any ideas? Thanks Andy <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
0
8425
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
8622
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
7355
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...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5647
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
4173
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...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
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.