VS 2005
How can you tell if a value is contained in a specific column (let's say
column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ? 10 4000
"Rob" <ro***@yahoo.comwrote in message
news:Ho******************************@comcast.com. ..
VS 2005
How can you tell if a value is contained in a specific column (let's say
column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
Wouldn't that be off of subitem? It's been a log time since I worked with a
ListView.
I think each subitem represents data in a column.
Yes, I think it goes like this...
MsgBox(ListView1.Items(intCount).SubItems(0).Text)
MsgBox(ListView1.Items(intCount).SubItems(1).Text)
Thanks,
Rob
"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:Oh**************@TK2MSFTNGP03.phx.gbl...
>
"Rob" <ro***@yahoo.comwrote in message
news:Ho******************************@comcast.com. ..
>VS 2005
How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
Wouldn't that be off of subitem? It's been a log time since I worked with
a ListView.
I think each subitem represents data in a column.
Rob,
As platinumBay you already showed, try to work with the data and not with
the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:Ho******************************@comcast.com. ..
VS 2005
How can you tell if a value is contained in a specific column (let's say
column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
I am working on a program that has many user defined controls within
flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and
their status. Only one user control may be "active" within a given flow
layout panel within a tab control. So in the unbound list view I keep a
"primary key" of the individual user control, as well as its status (2
separate columns).
When perfoming actions that change status, I iterate thru the list view to
make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Rob,
As platinumBay you already showed, try to work with the data and not with
the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:Ho******************************@comcast.com. ..
>VS 2005
How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
Rob,
There are non binded controls, simple databinded controls (textbox etc),
complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless
collections, keep in mind that the first column is very much different from
all the others. A listview has as well more ways it can be showed however
always with the first column on top. (it is just an older version of windows
explorer). http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview
because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:5K******************************@comcast.com. ..
>I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls
and their status. Only one user control may be "active" within a given
flow layout panel within a tab control. So in the unbound list view I
keep a "primary key" of the individual user control, as well as its status
(2 separate columns).
When perfoming actions that change status, I iterate thru the list view to
make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>Rob,
As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast.com ...
>>VS 2005
How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
Thanks Cor,
But I think my question remains... Is using a non-bound ListView a good
control to use for keeping track of "active" controls in the situation I
present below ?
The scenario...
I need a control that keeps track of each of these user defined controls
and their status. Only one user control may be "active" within a given
flow layout panel within a tab control. So in the unbound list view I
keep a "primary key" of the individual user control, as well as its status
(2 separate columns).
Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:OQ**************@TK2MSFTNGP03.phx.gbl...
Rob,
There are non binded controls, simple databinded controls (textbox etc),
complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless
collections, keep in mind that the first column is very much different
from all the others. A listview has as well more ways it can be showed
however always with the first column on top. (it is just an older version
of windows explorer).
http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview
because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:5K******************************@comcast.com. ..
>>I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
When perfoming actions that change status, I iterate thru the list view to make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl...
>>Rob,
As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast.co m... VS 2005
How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ?
In a list box you could go...
If ListBox1.Items.Contains(strWhatever) then
How would you accomplish this using a ListView ?
Rob,
No, I don't believe it is. You don't want to use a listview for keeping
track of that stuff, rather an in-memory object serialized maybe to
ViewState.
However, I would recommend using the MultiView control, which allows one
view to be visible at a time. http://msconline.maconstate.edu/tuto...pnet10-07.aspx
Hope this helps,
Steve
"Rob" <ro***@yahoo.comwrote in message
news:I4******************************@comcast.com. ..
Thanks Cor,
But I think my question remains... Is using a non-bound ListView a good
control to use for keeping track of "active" controls in the situation I
present below ?
The scenario...
I need a control that keeps track of each of these user defined controls
and their status. Only one user control may be "active" within a given
flow layout panel within a tab control. So in the unbound list view I
keep a "primary key" of the individual user control, as well as its status
(2 separate columns).
Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:OQ**************@TK2MSFTNGP03.phx.gbl...
>Rob,
There are non binded controls, simple databinded controls (textbox etc), complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless collections, keep in mind that the first column is very much different from all the others. A listview has as well more ways it can be showed however always with the first column on top. (it is just an older version of windows explorer).
http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:5K******************************@comcast.com ...
>>>I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
When perfoming actions that change status, I iterate thru the list view to make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl.. . Rob,
As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast.c om... VS 2005 > How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ? > In a list box you could go... > If ListBox1.Items.Contains(strWhatever) then > How would you accomplish this using a ListView ? > > > > >
Steve,
Hmmm...
This is a windows app. What is the specific downside of using a list view
for this ?
Basically, imagine a user control that has a Start and Stop button on it.
There could be 10 of these user controls sitting in a flow layout panel
inside of a tab control. Only 1 of these controls can have a Start button
"active" at any one point in time. Clicking a Start button on one of the
other 10 user controls "stops" the previously "started" user control and
activates the currently chosen user control.
Now that I think about it... I may be able to iterate thru all the controls
except for the chosen "Started" control and stop them without having to
update the List view.
Anyway... it is not necessarily a matter of viewing only one control at a
time. I did not make that clear.
Thanks for your input,
Rob
"PlatinumBay" <st*******@community.nospamwrote in message
news:uv**************@TK2MSFTNGP04.phx.gbl...
Rob,
No, I don't believe it is. You don't want to use a listview for keeping
track of that stuff, rather an in-memory object serialized maybe to
ViewState.
However, I would recommend using the MultiView control, which allows one
view to be visible at a time. http://msconline.maconstate.edu/tuto...pnet10-07.aspx
Hope this helps,
Steve
"Rob" <ro***@yahoo.comwrote in message
news:I4******************************@comcast.com. ..
>Thanks Cor,
But I think my question remains... Is using a non-bound ListView a good control to use for keeping track of "active" controls in the situation I present below ?
The scenario... I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
Rob "Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:OQ**************@TK2MSFTNGP03.phx.gbl...
>>Rob,
There are non binded controls, simple databinded controls (textbox etc), complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless collections, keep in mind that the first column is very much different from all the others. A listview has as well more ways it can be showed however always with the first column on top. (it is just an older version of windows explorer).
http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:5K******************************@comcast.co m... I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
When perfoming actions that change status, I iterate thru the list view to make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl. .. Rob, > As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data. > Cor > "Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast. com... >VS 2005 >> >How can you tell if a value is contained in a specific column (let's >say column 1 named Status) of a ListView ? >> >In a list box you could go... >> >If ListBox1.Items.Contains(strWhatever) then >> >How would you accomplish this using a ListView ? >> >> >> >> >> > >
Rob,
I am not sure what you are doing. However if you want to keep track on form,
I would certainly look at that treeview. On the form the controls are mostly
build up to as a tree. If it is just in memory, than you have to explain
more, but certainly a control is than the worst solution.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:I4******************************@comcast.com. ..
Thanks Cor,
But I think my question remains... Is using a non-bound ListView a good
control to use for keeping track of "active" controls in the situation I
present below ?
The scenario...
I need a control that keeps track of each of these user defined controls
and their status. Only one user control may be "active" within a given
flow layout panel within a tab control. So in the unbound list view I
keep a "primary key" of the individual user control, as well as its status
(2 separate columns).
Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:OQ**************@TK2MSFTNGP03.phx.gbl...
>Rob,
There are non binded controls, simple databinded controls (textbox etc), complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless collections, keep in mind that the first column is very much different from all the others. A listview has as well more ways it can be showed however always with the first column on top. (it is just an older version of windows explorer).
http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:5K******************************@comcast.com ...
>>>I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
When perfoming actions that change status, I iterate thru the list view to make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl.. . Rob,
As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast.c om... VS 2005 > How can you tell if a value is contained in a specific column (let's say column 1 named Status) of a ListView ? > In a list box you could go... > If ListBox1.Items.Contains(strWhatever) then > How would you accomplish this using a ListView ? > > > > >
Cor,
I would like to know "why" it is bad....
Maybe I am missing something, but as I open up new forms and user controls,
it becomes hard to know what the state of the control is in another location
(user control on a flow layout panel on a tab on another form)... the list
view has been set-up as a "Public Property" and is therefore accessible...
Thanks,
Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Rob,
I am not sure what you are doing. However if you want to keep track on
form, I would certainly look at that treeview. On the form the controls
are mostly build up to as a tree. If it is just in memory, than you have
to explain more, but certainly a control is than the worst solution.
Cor
"Rob" <ro***@yahoo.comschreef in bericht
news:I4******************************@comcast.com. ..
>Thanks Cor,
But I think my question remains... Is using a non-bound ListView a good control to use for keeping track of "active" controls in the situation I present below ?
The scenario... I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
Rob "Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:OQ**************@TK2MSFTNGP03.phx.gbl...
>>Rob,
There are non binded controls, simple databinded controls (textbox etc), complex databind controls combobox, datagrid etc.
Try the later for database work.
A listview is fore non database work. In fact it exist from endless collections, keep in mind that the first column is very much different from all the others. A listview has as well more ways it can be showed however always with the first column on top. (it is just an older version of windows explorer).
http://www.vb-tips.com/dbpages.aspx?...0-a31addde6d2c
Here a sample we have more samples. Have a look as well to the treeview because that is very much simular.
Cor
"Rob" <ro***@yahoo.comschreef in bericht news:5K******************************@comcast.co m... I am working on a program that has many user defined controls within flowlayout panels within tab controls....
I need a control that keeps track of each of these user defined controls and their status. Only one user control may be "active" within a given flow layout panel within a tab control. So in the unbound list view I keep a "primary key" of the individual user control, as well as its status (2 separate columns).
When perfoming actions that change status, I iterate thru the list view to make status changes.
I have figured out how to access the data now.
Is there a better way to do this ?
Thanks
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:%2****************@TK2MSFTNGP06.phx.gbl. .. Rob, > As platinumBay you already showed, try to work with the data and not with the controls as it is direct by a user typed in data. > Cor > "Rob" <ro***@yahoo.comschreef in bericht news:Ho******************************@comcast. com... >VS 2005 >> >How can you tell if a value is contained in a specific column (let's >say column 1 named Status) of a ListView ? >> >In a list box you could go... >> >If ListBox1.Items.Contains(strWhatever) then >> >How would you accomplish this using a ListView ? >> >> >> >> >> > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nsteele84 |
last post by:
Hi
I have the following code for a 3 column listview:
intNumItemsSelected = lstPieceMark.SelectedItems.Count
For intCount = 0 To intNumItemsSelected - 1
strPieceMark =...
|
by: zoneal |
last post by:
Hi I have a form with a listbox, two comboboxes and two Radiobuttons.
What I want to do is make a selection from both comboboxes and either
Radiobutton and display these three elements across the...
|
by: Thomas F.O'Connell |
last post by:
We've got a table that has a definition as follows:
CREATE TABLE linking_table (
fk int8 REFERENCES source_table( pk1 ),
value int8,
PRIMARY KEY( fk1, value )
);
I would've thought that...
|
by: Thomas Yagel |
last post by:
I have a situtation where a particular table includes a timestamp column and
a id column. The query I am working with right now filters based on
timestamp and orders based on ID.
I have not...
|
by: Paul Bromley |
last post by:
How can I use this please - I need 2 columns. I have been having difficulty
finding info on this and the 2005 Treeview control today.
Many thanks for any links or info,
Paul Bromley
|
by: WRH |
last post by:
Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...
...
|
by: balabaster |
last post by:
Hey guys and gals, I'm not sure if this is the simplest way to do this or if someone can throw any other ideas out there. I'm looking to build a treeview inside a listbox...or have a multicolumn...
|
by: piercy |
last post by:
Hi, ive been trying to produce something using a listview control which shows error messages for the emails sent from my application. Its a wierd concept so im going to try explain it best i can. I...
|
by: tthomas52 |
last post by:
I am trying to print the content of a listview with eight columns in it in vb.net 2003. So far everything I have tried has not worked. Below is the last code I tried using. It will print, however...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |