If you’re using the Visual Studio Forms Designer, you can select the DataRowTemplate in the grid on the form, go to the <b>Properties</b> panel, click on the <b>Events</b> button (the one with the lightning bolt), and double-click on the <b>DoubleClick</b> event.
If you want to do it in code, it should be placed after you have created and initialized the grid. If the grid is initialized in the <b>InitializeComponent</b> method (if you use the Visual Designer), you can add the line in the constructor of your form, right after the line: <b>InitializeComponent();</b>
Imported from legacy forums. Posted by Tommy (had 305 views)