Selecting a specific column in the selected row of a DataGrid

Selecting a specific column in the selected row of a DataGrid

Post by rhaaz » Sat, 01 Jul 2006 23:33:27



I'm using VS2003 and working with a datagrid.

The datagrid is filled using a dataset.

After the DataGrid is filled the user may be inclinded to select one of
these entries, if the user selects a row I want to be able to store the
value belonging to a specific column in the row.  Right now im using
the CurrentCellChange event and calling
datagrid1[datagridcell.rownumber, x]. but that isn't working very
smoothly.

 
 
 

1. Select a DataGrid row w/out a select column

Here's what I want to do:

desplay a bunch of data using a DataGrid and I want the user to be able to
click on any row and see it highlighted (say by changing all cell bkg prop.
color on that row).  Can a DataGrid do this w/ out all the inline templating
code that I'll have to write to do it manually - eg inserting unique cell
id's, onclick events for each cell etc ..

Note the key requirment is for the user to be able to select anywhere on the
row (not a naff <select> row).

Ie how can I get the DataGrids onItemCommand to fire from a mouse event in a
databound column.

Any sugestions at all would be apreciated, even alternative strategies.

Thanks in advance,
Michael McDowell
2A Queensbridge Rd.
London E2 8NR
Tel. (home): + (44) 20 7613 2580
       (mobile): + (44) 410023 659

2. S-Record Definition Document

3. Getting the value of a column/row when selecting a row in Datagrid

4. NNM or Netview in a unix cluster

5. Selecting specific DataGrid row programmatically?

6. Can I make it simpler?

7. DataGrid full row select and Doubclick select

8. printer driver for HP 692?

9. How to locate the selected row of the datagrid to a specifc row in the datagrid

10. Selecting DISTINCT rows using DataTable.Select() method

11. Clicked row instead of Selected row of DataGrid on DoubleClick event

12. DataTable select specified columns only, distinct rows