473,326 Members | 2,099 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,326 software developers and data experts.

Dataset

Hello,

In my application I'm using a typed dataset.
Now I want to display 3 row from that dataset as one listItem in a listbox.
There are 2 rows form the same table and one linked by a id form the parent
table.

I also want to be able to sort on one of the 3 rows at runtime.

How can I do this?

Thanks in advance
Nov 15 '05 #1
3 1210
Fredje,

If you are going to do some sort of display like this, then you will
have to construct the item (text) for the listbox yourself. The reason for
this is that data binding is going to give you one item in the list box per
row in the table (which makes the most sense, of course).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Fredje" <co*****@hotmail.com> wrote in message
news:Ev*******************@phobos.telenet-ops.be...
Hello,

In my application I'm using a typed dataset.
Now I want to display 3 row from that dataset as one listItem in a listbox. There are 2 rows form the same table and one linked by a id form the parent table.

I also want to be able to sort on one of the 3 rows at runtime.

How can I do this?

Thanks in advance

Nov 15 '05 #2
Hi Fredje,

Please clarify more your question, I think that you mean that you want to
display 3 columns as one ListItem, if this is the case then you have to do
as paldino says , you cannot use databinding and you will have to do the
concatenation using a cicle. this is also true if you are planning to lookup
the linked value on the other table and display another field instead.

If you want to sort it then the best way is to create a DataView sorted as
you need it and then populate the listbox.
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Fredje" <co*****@hotmail.com> wrote in message
news:Ev*******************@phobos.telenet-ops.be...
Hello,

In my application I'm using a typed dataset.
Now I want to display 3 row from that dataset as one listItem in a listbox. There are 2 rows form the same table and one linked by a id form the parent table.

I also want to be able to sort on one of the 3 rows at runtime.

How can I do this?

Thanks in advance

Nov 15 '05 #3
Thank you both for your reaction

You understood me right.
Could you tell me how I can lookup that linked field?

Thx

"Ignacio Machin" <ignacio.machin AT dot.state.fl.us> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Hi Fredje,

Please clarify more your question, I think that you mean that you want to
display 3 columns as one ListItem, if this is the case then you have to do
as paldino says , you cannot use databinding and you will have to do the
concatenation using a cicle. this is also true if you are planning to lookup the linked value on the other table and display another field instead.

If you want to sort it then the best way is to create a DataView sorted as you need it and then populate the listbox.
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Fredje" <co*****@hotmail.com> wrote in message
news:Ev*******************@phobos.telenet-ops.be...
Hello,

In my application I'm using a typed dataset.
Now I want to display 3 row from that dataset as one listItem in a

listbox.
There are 2 rows form the same table and one linked by a id form the

parent
table.

I also want to be able to sort on one of the 3 rows at runtime.

How can I do this?

Thanks in advance


Nov 15 '05 #4

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

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
3
by: Jeronimo Bertran | last post by:
Hi, I have an xml file that encapsulates a dataset definition within a set of tags (<dataset>)... here is an example <?xml version="1.0" encoding="utf-16"?> <dataset> <MyTable>...
5
by: Mike | last post by:
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an...
3
by: JJ | last post by:
Hi, I need to pass a dataset to another win form along with a SqldataAdapter. I don't want to recreate the SqlDataAdapter again either. So to pass to another Win form in my windows form app, do...
5
by: Jason | last post by:
I am having problems understanding how to access a datasource only once, fill a single dataset, and then reference that dataset multiple times through different user controls(ascx) found on the...
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.