Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: restore database at an other server Pin
Mycroft Holmes13-May-09 18:05
professionalMycroft Holmes13-May-09 18:05 
AnswerRe: restore database at an other server Pin
Rhys Jacob13-May-09 22:23
Rhys Jacob13-May-09 22:23 
QuestionHow to modify the foreach identifier? Pin
blackhattrick13-May-09 17:02
blackhattrick13-May-09 17:02 
AnswerRe: How to modify the foreach identifier? PinPopular
Luc Pattyn13-May-09 17:28
sitebuilderLuc Pattyn13-May-09 17:28 
JokeRe: How to modify the foreach identifier? Pin
Samer Aburabie13-May-09 20:22
Samer Aburabie13-May-09 20:22 
QuestionDynamically adding a action to a datagrid Pin
Brad Wick13-May-09 13:29
Brad Wick13-May-09 13:29 
AnswerRe: Dynamically adding a action to a datagrid Pin
Mycroft Holmes13-May-09 14:30
professionalMycroft Holmes13-May-09 14:30 
AnswerRe: Dynamically adding a action to a datagrid Pin
Henry Minute13-May-09 14:38
Henry Minute13-May-09 14:38 
If I have correctly understood what it is that you want to do.

Create a RowHeaderMouseClick event handler like this (I assume that this is the handler you want)
private void DataGridView_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
            DataGridView dgv = (DataGridView(sender;

            // do whatever you want here dgv points to the grid that had its row clicked
            dgv.CurrentRow.Cells["Name"].Value = "Fred"; // or whatever
}


The same principle applies to any handler for multiple controls.

Then in the code that you posted, I dont think it matters where as long as it is after instantiation:
dataGridTicketInformation.RowHeaderClick += DataGridView_RowHeaderMouseClick;


BTW if the grid is disposed befor closing the app by using:
dataGridTicketInformation.RowHeaderClick -= DataGridView_RowHeaderMouseClick;


Hope this helps.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: Dynamically adding a action to a datagrid Pin
Mycroft Holmes13-May-09 18:07
professionalMycroft Holmes13-May-09 18:07 
GeneralRe: Dynamically adding a action to a datagrid Pin
Henry Minute13-May-09 23:18
Henry Minute13-May-09 23:18 
GeneralRe: Dynamically adding a action to a datagrid Pin
Mycroft Holmes13-May-09 23:23
professionalMycroft Holmes13-May-09 23:23 
GeneralRe: Dynamically adding a action to a datagrid Pin
Henry Minute14-May-09 0:04
Henry Minute14-May-09 0:04 
GeneralRe: Dynamically adding a action to a datagrid Pin
Brad Wick14-May-09 4:58
Brad Wick14-May-09 4:58 
GeneralRe: Dynamically adding a action to a datagrid Pin
Henry Minute14-May-09 11:13
Henry Minute14-May-09 11:13 
GeneralRe: Dynamically adding a action to a datagrid Pin
Brad Wick14-May-09 13:00
Brad Wick14-May-09 13:00 
GeneralRe: Dynamically adding a action to a datagrid Pin
Henry Minute14-May-09 13:13
Henry Minute14-May-09 13:13 
QuestionC# & Core 2 due CPUs Pin
Mohammad Dayyan13-May-09 12:30
Mohammad Dayyan13-May-09 12:30 
AnswerRe: C# & Core 2 due CPUs Pin
Luc Pattyn13-May-09 12:46
sitebuilderLuc Pattyn13-May-09 12:46 
AnswerRe: C# & Core 2 due CPUs Pin
Joe Woodbury13-May-09 15:38
professionalJoe Woodbury13-May-09 15:38 
Questionhow to add numbers to form with specified position Pin
Aljaz11113-May-09 12:27
Aljaz11113-May-09 12:27 
AnswerRe: how to add numbers to form with specified position Pin
Tony Richards13-May-09 12:43
Tony Richards13-May-09 12:43 
GeneralRe: how to add numbers to form with specified position Pin
Aljaz11113-May-09 12:46
Aljaz11113-May-09 12:46 
GeneralRe: how to add numbers to form with specified position Pin
Luc Pattyn13-May-09 13:20
sitebuilderLuc Pattyn13-May-09 13:20 
AnswerRe: how to add numbers to form with specified position Pin
Henry Minute13-May-09 14:42
Henry Minute13-May-09 14:42 
QuestionHow to stop an Event Pin
Payam Rastogi13-May-09 10:11
Payam Rastogi13-May-09 10:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.