Skip to content

Newbie needs to know simple datagrid answer

jpshaver

Asked Nov 19, 2005, 6:41 PM EST1 answer
Share
LinkedInX
I have created and filled a data grid in C#.NET from a sql stored procedure.  The user is to select a row of the displayed data grid and then press a button in order that my program perform further information display of the record selected.  The simple question (that I am embarrassed in not being able to figure out!) is how can my program get the value of one of the cells of the row that is selected.  (I know the index of the row, and I know the column from which to retrieve data, but I don't know how to simply pull the text information out of that cell.

Any help would be most appreciated.

Bonus points and praise if I could know how to present the cells in that column as hot links that a user could just click in order to instruct my program to perform the additional work.

Thanks so much in advance,

Jerry

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Some useful objects:
    1. HitTest method (to get an object under mouse click; it has an error in Visual Studio editor help - is invisible)
    2. DataGrid indexer: myDataGrid[row,column]
    3. Protected property ListManager to get DataView used by DataGrid
    0