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 / December 2004

Tip: Looking for answers? Try searching our database.

Establishing currency in a datagrid to the dataset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ScottBH@online.nospam - 10 Dec 2004 22:09 GMT
I'm trying to implement a custom format in a windows forms datagrid on a row
basis. I'm using the code example that comes in MSDN that overloads the paint
event.

What I'd like to do is find out how I can find out which row in the
underlying data source (in this case a dataset) is being used when the the
paint event fires. I tried using the currency manager, but its returning the
same row to me (the top row of the grid).

I'm trying to avoid putting all the fields of the dataset in the datagrid.
I'm looking at a series of booleans to decide what the color of the row
should be, but there's no reason to display those booleans to the user, or
carry their overhead in the datagrid either.

I really miss some features of the VB6 datagrid; in this case, the ability
to select a grid area and set the color to whatever I want it to be. This
overloading the paint event seems way overcomplicated!

Suggestions?
Ken Tucker [MVP] - 12 Dec 2004 04:40 GMT
Hi,

          Maybe these will help.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/ht
ml/vbtchformattingwindowsformsdatagridvisualbasicprimer.asp


http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q973q

Ken
-----------------
I'm trying to implement a custom format in a windows forms datagrid on a row
basis. I'm using the code example that comes in MSDN that overloads the
paint
event.

What I'd like to do is find out how I can find out which row in the
underlying data source (in this case a dataset) is being used when the the
paint event fires. I tried using the currency manager, but its returning the
same row to me (the top row of the grid).

I'm trying to avoid putting all the fields of the dataset in the datagrid.
I'm looking at a series of booleans to decide what the color of the row
should be, but there's no reason to display those booleans to the user, or
carry their overhead in the datagrid either.

I really miss some features of the VB6 datagrid; in this case, the ability
to select a grid area and set the color to whatever I want it to be. This
overloading the paint event seems way overcomplicated!

Suggestions?

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.