Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Datagrid

Posted on 2004-04-20
7
Medium Priority
?
510 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
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.

 
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 1200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

715 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