By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,911 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,911 IT Pros & Developers. It's quick & easy.

Selecting Row in a DataGrid when a Cell is Selected

P: n/a
Hi There

I have a datagrid whose main purpose in life is to provide a nice way
for users to make a single choice from a list. The grid is read only,
single row select and has its data source as an ArrayList.

I came up against the issue of selecting a cell and getting the whole
row to highlight, and the second issue of unhighlighting any previously
selected row. To get around these two issues I have put in a two prong
approach:
- In the 'CurrentCellChanged' event I highlight the whole row
- In the 'MouseUp' event I unhighlight all the other rows and set the
CurrentRowIndex

All is good except for one minor issue that the FUSSY acceptance
testers have raised. ... Click on the TEXT within a datagrid cell and
hold down the mouse button ... all cells in the row are highlighted
except the cell that was clicked. In the cell that was clicked, only
the text is highlighted and the back color is different. When the
mouse button is released the clicked cell highlights properly.

The FUSSY acceptance testers want the row to highlight immediately,
regardless of where in the row the user clicks.

Please help me with this one as I am at a dead end !!

Thanks In Advance
Bill

Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply

This discussion thread is closed

Replies have been disabled for this discussion.