473,396 Members | 1,966 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,396 software developers and data experts.

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.index 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 1992

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

Similar topics

13
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...
0
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...
0
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!! ...
3
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,...
4
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
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...
3
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...
1
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;...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...

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.