Datagrid Question

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi,

Can anyone tell me how if a user clicks on a row on a datagrid I can get the
contents of the first cell on that row into a variable?

Many Thanks
Richard
 
Richard,

The windowforms datagrid holds its data using references where the first
reference is the datasource.

Keep in mind that when you do not set allowsort to off, the user can
rearrange the sequence.

I advice you to use the dataview as the datasource and the currencymanger
(not a moneymanager) to keep track what is the current row.

Have a look for those two on MSDN.microsoft.com

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

http://msdn.microsoft.com/library/d...ef/html/frlrfSystemDataDataViewClassTopic.asp

I hope this helps?

Cor
 

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

Back
Top