Solved

Datagrid

Posted on 2004-04-20
7
509 Views
Last Modified: 2010-04-15
I want to create a windows form with a textfield where I can enter a MODEL NUMBER of the TV for example click search button and search a database table for a model number. Once a match is met I would like to populate a datagrid with the title for the model number. I want to be able to double click on a title. If I double click on a title in a datagrid I want a textfield on a form to get the value of a title from a datagrid. Any tutorials out there that accouplish something similar? Can anybody help?

This is what the datagrid should look like after it is populated with a data from a database.
----------------------------------------------
| Model Number |  Title of The Model   |
----------------------------------------------
| vpw425           | View Sonic              |
----------------------------------------------
| kde50xbr         | Sony Plasma TV      |
----------------------------------------------
0
Comment
Question by:TransBind
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 9

Expert Comment

by:malharone
ID: 10870722
this is a great solution .. i've always used it for reference when learning databinding stuff in .net

hope this helps
0
 
LVL 7

Author Comment

by:TransBind
ID: 10870763
u forgot a link?
0
 
LVL 9

Expert Comment

by:malharone
ID: 10870773
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 7

Author Comment

by:TransBind
ID: 10870946
can u point to a particular tutorial that deals with my problems?
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 10875722
I think this will solve your problem:

You can use the DataGrid's double-click event and its HitTest method to catch a double click on a header.
 
     private void dataGrid1_DoubleClick(object sender, System.EventArgs e)
 
     {
 
          System.Drawing.Point pt = dataGrid1.PointToClient(Cursor.Position);
 

 
          DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt);
 

 
          if(hti.Type == DataGrid.HitTestType.ColumnHeader)
 
          {
 
               MessageBox.Show("double clicked clicked column header " + hti.Column.ToString());
 
          }
 
     }
 
0
 
LVL 7

Author Comment

by:TransBind
ID: 10884385
TheAvenger: how about a double click event on a cell? to get its value
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 300 total points
ID: 10886017
Have a look here. The problem is explained and there is some example code (through a link):

http://www.syncfusion.com/faq/winforms/search/869.asp
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question