I wonder if it is possible to read the content of a select cell via a click on that cell. Say, row 2 and column 3 displays "abc" string. Now, when user clicks on this cell, I want the following code to be executed in some event:
dim strTemp As String = <cell content "abc">
Upon click on this cell, it is expected string "abc" to appear on the web page.
What event(s) in a gridview this code should go? I can use any other control you may suggest capable of this function where the data is displayed in a tabular fashion.
(If I was using MS Access, for example, I could have done this via a listbox control or subform.)
The link below explains the process but I am not quite sure how to apply it yet:
Someone explained how I can doe this by saying:
"... you can pull in a couple of arguments from the GridViewCommandEventArgs. You can get the CommandName and the CommandArgument. You will see when you add LinkButtons and Buttons that they have CommandNames and CommandArgument properties which can be set. During the databinding you can dynamically assign values to these properties such as a column index.
Then in the rowcommand event you will have access to them by way of the GridViewCommandEventArgs."
You can see this in the last code block of the above link.
Question: Could you please help me to make this work? You could possibly help me to understand it all by a sample code.