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 / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

What functionality give the DataGridView Control in .net 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TonyJ - 27 Feb 2008 07:24 GMT
Hello!

My question is the following.
I use window forms with C# and just wonder if existing DataGridView Control
in  .NET 2.0 support my needs see below ?

My need is to have a bound or unbound probably unbound grid with i rows and
j columns where i might !=j.
A cell is defined by the intersection between the row and the column. For
example the intersection between row 3 and column 4 is defined by cell(3,4).

Several cells might have different types in one and the same column. Here is
an example what I
mean assume I have a grid Control with i rows and j columns.
In column x and y and probably some other column I want to have different
types for
example in cell(x, n1) I might have text type and cell(x, n2) I might have
combo box selection and at cell(x, n3) I
might want to have check box selection and at cell(x,n4) I
might want to some other type for example double. I might want to have other
types as well in this column x
for example images.

As as summary I need to fully be able to customize my grid in any type.
A normal grid have the same type in one column but my grid must me a special
grid allowing to have different types in one or more column.

So does the current DataGridView Control in  .NET 2.0 support my needs or
not?

If yes have you then any good page that you can recommend to start looking
at  ?

//Tony
Marc Gravell - 27 Feb 2008 07:40 GMT
> So does the current DataGridView Control in  .NET 2.0 support my needs or
> not?

I'm pretty sure that the answer is "no". Peter has already suggested
an alternative (last time you asked).

Marc
Andrus - 27 Feb 2008 11:15 GMT
> So does the current DataGridView Control in  .NET 2.0 support my needs or
> not?

I think that it does.
You can use virtual mode and handle CellValueNeeded to return different data
types for any cell.
You can use OnEditcontorlShowning event to create different type of edit
controls based on the same base edit control type.

> If yes have you then any good page that you can recommend to start looking
> at  ?

MSDN Virtual DataGridView sample.

Andrus.

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.