Establishing currency in a datagrid to the dataset

G

Guest

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?
 
K

Ken Tucker [MVP]

Hi,

Maybe these will help.

http://msdn.microsoft.com/library/d...tingwindowsformsdatagridvisualbasicprimer.asp

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

Ken
-----------------
"(e-mail address removed)" <[email protected]>
wrote in message 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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top