• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

what kind of this method for c#

what kind of class that in  the red circle and when we click enter or aroww dow it connect to get data form database ( when we have a bottom it have a method like onclik but on this case what is it method)
mbmbn.jpg
0
teera
Asked:
teera
2 Solutions
 
vs1784Commented:
If its a datagridview then i guess its OnCellMouseDoubleClick
0
 
jarwCommented:
If it is a DataGridView, you could try catching an event such as "KeyUp" to handle the UP ARROW and ENTER keys. I'll include a sample for how the code for the event handler might look below.
void grid1_KeyUp(object sender, KeyEventArgs e)
{
   if (e.KeyData == Keys.Enter)
   {
      // If the ENTER key was pressed, do something...
   }
   else if (e.KeyData == Keys.Up)
   {
      // If the UP ARROW key was pressed, do something...
   }
}

Open in new window

0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now