codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Using a column in a selected row - DataGrid newbie question  ml3bf at 10:48 on Saturday, March 20, 2004
 

I am trying to select a row in a DataGrid by simply clicking on the row (any column in the row) which will in turn open a new form with various controls which are binded to the original record which was selected in the DataGrid.

I have the following code which selects the whole row when clicked


Private Sub DataGridComplaints_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridComplaints.MouseUp
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = DataGridComplaints.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
DataGridComplaints.CurrentCell = New DataGridCell(hti.Row, hti.Column)
DataGridComplaints.Select(hti.Row)
End If
End Sub

How do I use a column in the selected row to pass information into a variable which can then be used on the next form?

Many thanks for any help you can give me.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo
•  Cookies and Threads C++
•  right justify a background in a table?
•  Help with Loop (C++/MFC)
•  Help with Loop (C++/MFC)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007