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

Databinding to Array of objects

Hi All:
I have array of objects that binds to a list box control on win form. My
problem is I do not want to display every object in the array on the list
box. Is there an event or function occurs in the data-binding object, which
allows me to control actual items that display on the screen.

Thanks in advance
DK
Nov 2 '06 #1
3 1665
Hi,

Have you tried binding to a copy of the Array after removing the items that
you don't want?

--
Dave Sexton

"da*******@opco.com" <da*************@discussions.microsoft.comwrote in
message news:E2**********************************@microsof t.com...
Hi All:
I have array of objects that binds to a list box control on win form. My
problem is I do not want to display every object in the array on the list
box. Is there an event or function occurs in the data-binding object, which
allows me to control actual items that display on the screen.

Thanks in advance
DK

Nov 2 '06 #2
Sure I can do this. But I am thinking it must have a better solution than this.

"Dave Sexton" wrote:
Hi,

Have you tried binding to a copy of the Array after removing the items that
you don't want?

--
Dave Sexton

"da*******@opco.com" <da*************@discussions.microsoft.comwrote in
message news:E2**********************************@microsof t.com...
Hi All:
I have array of objects that binds to a list box control on win form. My
problem is I do not want to display every object in the array on the list
box. Is there an event or function occurs in the data-binding object, which
allows me to control actual items that display on the screen.

Thanks in advance
DK


Nov 2 '06 #3
Hi,

It seems like a good solution to me. A better solution might be to only fill
the Array with data that you want in the first place.

--
Dave Sexton

"da*******@opco.com" <da*************@discussions.microsoft.comwrote in
message news:9C**********************************@microsof t.com...
Sure I can do this. But I am thinking it must have a better solution than
this.

"Dave Sexton" wrote:
>Hi,

Have you tried binding to a copy of the Array after removing the items that
you don't want?

--
Dave Sexton

"da*******@opco.com" <da*************@discussions.microsoft.comwrote in
message news:E2**********************************@microsof t.com...
Hi All:
I have array of objects that binds to a list box control on win form. My
problem is I do not want to display every object in the array on the list
box. Is there an event or function occurs in the data-binding object,
which
allows me to control actual items that display on the screen.

Thanks in advance
DK



Nov 2 '06 #4

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

Similar topics

0
by: Victor Jones | last post by:
I have a general question about the approach towards databinding controls with objects. Apart from the databinding offered by .NET to bind data, it can be extended to have the same behavior with...
0
by: Victor Jones | last post by:
I have a general question about the approach towards databinding controls with objects. Apart from the databinding offered by .NET to bind data, it can be extended to have the same behavior with...
1
by: D. Shane Fowlkes | last post by:
This should be easy but I'm having a little trouble connecting the logical dots. I have a function which simply returns the 12 month names. Whoopie. I'm trying to store that data into an...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
1
by: Andy Fish | last post by:
Hi, Say I have an Array of "Person" objects that I'm using as the DataSource for a grid control. At databinding time I'd like to select only people with age>18 to go into the grid and ignore all...
5
by: Trail Monster | last post by:
Ok, I've been searching the net now for several days and can't find how to do this anywhere. Version: VS 2005 Professional Release, 2.0 Framework Background: I have a complex business object...
6
by: Paul | last post by:
Hi All, Framework 1.1 listbox control unable to DataBind I've been googling for an answer to this query that appears quite a lot, but none, it seem, answers my problem directly. I am...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
2
by: udupi_mail | last post by:
Hello, Was hoping to get some feeback on the following: Current arch. is a swing client with corba services deployed on AIX. Data tranferred over the wire is XML(string) instead of traditional...
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: 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$) { } ...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.