Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

DataGrids WITHOUT DataTables, etc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 22 Jun 2006 18:48 GMT
Hi,

I am building an object based system and have my data in the form of objects
with properties.  I dont want to have to load them into DataTables just so I
can use them with a DataGrid.  However I cannot see any easy way of
switching which cells are read-only or visible once I have bound a
collection to the DataGrid.  I have had a look at TableStyles and
GridColumnStyles, but changes I make dont seem to do anything.  Can someone
recommend a good site where I can learn about these finer details, without
needing to use DataTables and such like?

Thanks in advance,

j.
John - 22 Jun 2006 20:35 GMT
Hi,

I managed to find out that I need to put ArrayList in the
TableStyles.MappingName property of the DataGrid.  My problem now is that I
am adding multiple objects to the array list and only the first is shown in
the grid.  I havent got a clue why this is- none of the properties seem to
indicate what might be going wrong or what I might have omitted.

Please help!

j.

> Hi,
>
[quoted text clipped - 10 lines]
>
> j.
Otis Mukinfus - 23 Jun 2006 02:35 GMT
>Hi,
>
[quoted text clipped - 22 lines]
>>
>> j.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Otis Mukinfus - 23 Jun 2006 02:54 GMT
>Hi,
>
[quoted text clipped - 22 lines]
>>
>> j.

John,

If you are using .NET 1.x you will need to implement IBidingList with your
collections.  ArrayList objects do not implement IBindingList, so they will not
behave as you expect with DataGrids.  Your objects will also need to implement
IEditable.  The help files for .NET 1.x have all the information you need to get
started, but there is a lot of work for you to do along the way.

The same is true of .NET 2.0 but it is not as difficult as with .NET 1.x, since
there are generic classes specifically for this type of databinding.  A good
book on Data Binding with .NET 2.0 is "Data Binding with Windows Forms 2.0" by
Brian Noyes.  Publisher: Addison Wesley.  I believe he may have also written a
book targeting .NET 1.x, but do not know that for a fact.

With either version of .NET you will be doing a lot of coding to get it done.
You may want to reconsider using DataSets and DataAdapters after reading up on
what is required.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.