Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionapplication.run Pin
amaneet18-Feb-07 1:00
amaneet18-Feb-07 1:00 
AnswerRe: application.run Pin
Colin Angus Mackay18-Feb-07 4:36
Colin Angus Mackay18-Feb-07 4:36 
Questionshared keyword in vb.net Pin
amaneet18-Feb-07 0:48
amaneet18-Feb-07 0:48 
AnswerRe: shared keyword in vb.net Pin
Colin Angus Mackay18-Feb-07 4:34
Colin Angus Mackay18-Feb-07 4:34 
GeneralRe: shared keyword in vb.net Pin
amaneet19-Feb-07 3:36
amaneet19-Feb-07 3:36 
GeneralRe: shared keyword in vb.net Pin
Hossein Narimani Rad20-Feb-07 19:13
Hossein Narimani Rad20-Feb-07 19:13 
Questiontransfer attribute from 1 datagrid to another Pin
kendo1718-Feb-07 0:17
kendo1718-Feb-07 0:17 
AnswerRe: transfer attribute from 1 datagrid to another Pin
Johan Hakkesteegt23-Feb-07 0:40
Johan Hakkesteegt23-Feb-07 0:40 
Hi Kendo,

If I understand correctly what you are asking, you can try something like this:
1. populate dataset 1 and bind it to datagrid 1
2. adapt the following code to get the row the user clicked on, and the corresponding cell value:
Private Sub Datagrid1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Datagrid1.MouseDown<br />
Try<br />
Dim myGrid As DataGrid = CType(sender, DataGrid)<br />
Dim hti As System.Windows.Forms.DataGrid.HitTestInfo<br />
hti = myGrid.HitTest(e.X, e.Y)<br />
Dim message As String = "You clicked "<br />
Select Case hti.Type<br />
Case System.Windows.Forms.DataGrid.HitTestType.None<br />
message &= "the background."<br />
Case System.Windows.Forms.DataGrid.HitTestType.Cell<br />
message &= "cell at row " & hti.Row & ", col " & hti.Column<br />
Case System.Windows.Forms.DataGrid.HitTestType.ColumnHeader<br />
message &= "the column header for column " & hti.Column<br />
Case System.Windows.Forms.DataGrid.HitTestType.RowHeader<br />
message &= "the row header for row " & hti.Row<br />
Case System.Windows.Forms.DataGrid.HitTestType.ColumnResize<br />
message &= "the column resizer for column " & hti.Column<br />
Case System.Windows.Forms.DataGrid.HitTestType.RowResize<br />
message &= "the row resizer for row " & hti.Row<br />
Case System.Windows.Forms.DataGrid.HitTestType.Caption<br />
message &= "the caption"<br />
Case System.Windows.Forms.DataGrid.HitTestType.ParentRows<br />
message &= "the parent row"<br />
MsgBox(message)<br />
End Select<br />
Catch Ex As Exception<br />
MsgBox(Ex.Message)<br />
End Try<br />
End Sub

3. Execute a parametrized query to populate dataset 2 with the data you want to show in datagrid 2, using the cell value obtained in the code above.
4. bind dataset 2 to datagrid 2

Good luck,

Johan



My advice is free, and you may get what you paid for.

QuestionSelectedIndexChange of DDL inside Datagrid.. HELP!! Pin
Huvandhuma17-Feb-07 19:50
Huvandhuma17-Feb-07 19:50 
AnswerRe: SelectedIndexChange of DDL inside Datagrid.. HELP!! Pin
Marcus J. Smith19-Feb-07 3:39
professionalMarcus J. Smith19-Feb-07 3:39 
QuestionCopy any Folder & its Sub Folder in My Document Pin
Vikash Yadav17-Feb-07 17:59
Vikash Yadav17-Feb-07 17:59 
AnswerRe: Copy any Folder &amp; its Sub Folder in My Document Pin
MatrixCoder17-Feb-07 18:28
MatrixCoder17-Feb-07 18:28 
AnswerRe: Copy any Folder & its Sub Folder in My Document Pin
TwoFaced17-Feb-07 18:45
TwoFaced17-Feb-07 18:45 
QuestionColor of a Pixel in a image in a pictureBox Pin
charchabil0317-Feb-07 7:58
charchabil0317-Feb-07 7:58 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Christian Graus17-Feb-07 9:48
protectorChristian Graus17-Feb-07 9:48 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
The ANZAC17-Feb-07 14:14
The ANZAC17-Feb-07 14:14 
Questioncrystal report multiple headings Pin
nilam1117-Feb-07 1:51
nilam1117-Feb-07 1:51 
Questiondatetime setting Pin
nilam1117-Feb-07 1:31
nilam1117-Feb-07 1:31 
AnswerRe: datetime setting Pin
nlarson1117-Feb-07 1:45
nlarson1117-Feb-07 1:45 
QuestionHow to deploy .net Crystal Report with .net setup project Pin
Ali 11016-Feb-07 23:38
Ali 11016-Feb-07 23:38 
QuestionColor of a Pixel in a image in a pictureBox Pin
charchabil0316-Feb-07 23:13
charchabil0316-Feb-07 23:13 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Guffa17-Feb-07 1:12
Guffa17-Feb-07 1:12 
GeneralRe: Color of a Pixel in a image in a pictureBox Pin
charchabil0317-Feb-07 3:52
charchabil0317-Feb-07 3:52 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Guffa17-Feb-07 9:31
Guffa17-Feb-07 9:31 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
The ANZAC17-Feb-07 14:11
The ANZAC17-Feb-07 14:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.