Higlighting a DataGrid Row?

L

Lars Netzel

I want to be able to highlight the row in the datagrid... I want this to
happen when I click on a cell in that row and if I click in a cell on
another row I want to hightlight THAT whole row.. is it possible?

/Lars
 
L

Lars Netzel

I know it's DataGrid.Select(rowIndex) but how do I specify the Color of the
hightlight...

/Lars
 
C

Cor Ligthert

Hi Ken,

That was what I was thinking as well, however with a datagrid with a bool
column, a comboboxcolumn, a calendercolumn, a textboxcolumn this looks for
me a lot of work,

(Before you say it, I do not see it as a challenge to make it)

Cor
 
K

Ken Tucker [MVP]

Hi,

Sorry. Take a look at the datagrid and tablestyles selectionbackcolor
and selectionforecolor properties.

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

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

Ken
---------------

Ken Tucker said:
Hi,

You will have to make a derived datagridtextboxcolumn for that.

HYPERLINK
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms
/html/wnf_custdatagrid.asp"http://msdn.microsoft.com/library/default.asp?url
=/library/en-us/dnwinforms/html/wnf_custdatagrid.asp

Ken
------------------

I know it's DataGrid.Select(rowIndex) but how do I specify the Color
of
the
hightlight...

/Lars


"Lars Netzel" <[stop_spam]@host.topdomain> skrev i meddelandet
I want to be able to highlight the row in the datagrid... I want
this
to
happen when I click on a cell in that row and if I click in a cell
on
another row I want to hightlight THAT whole row.. is it possible?

/Lars
 

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