PC Review


Reply
Thread Tools Rate Thread

Data Binding

 
 
csharpula csharp
Guest
Posts: n/a
 
      26th Nov 2007
Hello,
I am trying to do data binding with c# Binding - trying to bind
list<object> to a list view. Is there any code example for doing that?
Thank you!

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      26th Nov 2007
The ListView class in C# does not support data binding. The one in WPF
offers data binding, I believe.

If you want to populate items from a data source to the ListView in
Windows Forms, then you have to populate it manually.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"csharpula csharp" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> Hello,
> I am trying to do data binding with c# Binding - trying to bind
> list<object> to a list view. Is there any code example for doing that?
> Thank you!
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
csharpula csharp
Guest
Posts: n/a
 
      27th Nov 2007
What about ListBox or any other control that can present list (also can
sort it) and to provide binding of data?


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      27th Nov 2007
You can use the ListBox, yes. You would have to set the DataSource (and
possibly DataMember) properties to the data source.

If you are using a DataTable as the source, then I recommend you create
a DataView on the DataTable and then sort that, and bind the ListBox to the
DataView.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"csharpula csharp" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What about ListBox or any other control that can present list (also can
> sort it) and to provide binding of data?
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Noob question - binding data to list box (system.data.datarowview?) David Wier Microsoft ASP .NET 0 17th Apr 2008 06:03 PM
Re: Noob question - binding data to list box (system.data.datarowview?) Lloyd Sheen Microsoft ASP .NET 0 17th Apr 2008 05:23 PM
100K item data binding: Is asynchronous data binding possible? R Reyes Microsoft C# .NET 14 5th Feb 2008 09:47 PM
howto manually pull data for data binding gnih Microsoft C# .NET 0 6th Nov 2006 07:48 AM
Re: Data Binding - using inline code vs. functions vs. straight binding Alvin Bruney [MVP] Microsoft ASP .NET 0 9th Mar 2004 01:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:16 AM.