Click here to Skip to main content
15,920,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow can i use values form one form to another in vb.net Pin
r_mohd28-Feb-08 22:24
r_mohd28-Feb-08 22:24 
AnswerRe: how can i use values form one form to another in vb.net Pin
yogesh_kumar_agarwal28-Feb-08 22:58
yogesh_kumar_agarwal28-Feb-08 22:58 
AnswerRe: how can i use values form one form to another in vb.net Pin
darkelv29-Feb-08 3:38
darkelv29-Feb-08 3:38 
AnswerRe: how can i use values form one form to another in vb.net Pin
tjskcp5-Mar-08 18:07
tjskcp5-Mar-08 18:07 
GeneralLighttpd & HTTPWEBREQUEST question Pin
Daniel Lopez28-Feb-08 17:35
Daniel Lopez28-Feb-08 17:35 
Questionmenu strip Pin
Tauseef A28-Feb-08 17:23
Tauseef A28-Feb-08 17:23 
GeneralRe: menu strip Pin
Xmen Real 28-Feb-08 17:38
professional Xmen Real 28-Feb-08 17:38 
Generalerror-cannot check the checkbox in datagrid after 2nd search Pin
Eunice (VB junior)28-Feb-08 14:51
Eunice (VB junior)28-Feb-08 14:51 
Hi,
I have a datatable retrieve data in a datagrid with a checkbox column bounded to it.
On the 1st data retrieval on datagrid, I'm able to check the checkbox.
But if i click search to have 2nd data retrieval on datagrind, I'm unable to check the checkbox.
Below is my code, i hope someone can guide me to solve this.

Private selectedRows As ArrayList

Private Sub dgResult_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim hit As DataGrid.HitTestInfo = dgResult.HitTest(e.X, e.Y)
If hit.Column = 0 AndAlso hit.Type = DataGrid.HitTestType.Cell Then
dgResult(hit.Row, hit.Column) = Not CBool(dgResult(hit.Row, hit.Column))

If CBool(dgResult(hit.Row, hit.Column)) Then
selectedRows.Add(hit.Row)
dgResult.[Select](hit.Row)
Else
selectedRows.Remove(hit.Row)
End If

End If
End Sub

I did run step by step to check the error. When the 2nd retrieval, it run through the codes twice.
1st, it run
Private Sub dgResult_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
If hit.Column = 0 AndAlso hit.Type = DataGrid.HitTestType.Cell Then
dgResult(hit.Row, hit.Column) = Not CBool(dgResult(hit.Row, hit.Column))
If CBool(dgResult(hit.Row, hit.Column)) Then
selectedRows.Add(hit.Row)
dgResult.[Select](hit.Row)
end if
end sub
then continue to run it again but this time to remove the check.
Private Sub dgResult_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
If hit.Column = 0 AndAlso hit.Type = DataGrid.HitTestType.Cell Then
dgResult(hit.Row, hit.Column) = Not CBool(dgResult(hit.Row, hit.Column))
If CBool(dgResult(hit.Row, hit.Column)) Then
selectedRows.Remove(hit.Row)
end if
end sub
So, it seems i cannot check.
But in actual, it added the check and removed the check at the same time.

Can anyone help me? Thanks.

eunice
QuestionSave image in PostgresSQL DB Pin
nishkarsh_k28-Feb-08 8:56
nishkarsh_k28-Feb-08 8:56 
GeneralRe: Save image in PostgresSQL DB Pin
Christian Graus28-Feb-08 9:32
protectorChristian Graus28-Feb-08 9:32 
GeneralRe: Save image in PostgresSQL DB Pin
nishkarsh_k28-Feb-08 18:08
nishkarsh_k28-Feb-08 18:08 
GeneralRe: Save image in PostgresSQL DB Pin
Christian Graus28-Feb-08 18:29
protectorChristian Graus28-Feb-08 18:29 
QuestionNeed Help... Dial, Connect and Use a BBS in VB.Net Pin
Scyrious28-Feb-08 5:03
Scyrious28-Feb-08 5:03 
GeneralRe: Need Help... Dial, Connect and Use a BBS in VB.Net Pin
Christian Graus28-Feb-08 9:38
protectorChristian Graus28-Feb-08 9:38 
GeneralRe: Need Help... Dial, Connect and Use a BBS in VB.Net Pin
Scyrious29-Feb-08 3:12
Scyrious29-Feb-08 3:12 
QuestionAdd records to databound datagridview Pin
David Mujica28-Feb-08 4:40
David Mujica28-Feb-08 4:40 
GeneralRe: Add records to databound datagridview Pin
Dave Kreskowiak29-Feb-08 3:21
mveDave Kreskowiak29-Feb-08 3:21 
AnswerWorking now Pin
David Mujica29-Feb-08 9:39
David Mujica29-Feb-08 9:39 
QuestionAcessing certificate store of local system Pin
shinlang28-Feb-08 3:51
shinlang28-Feb-08 3:51 
GeneralRe: Acessing certificate store of local system Pin
Dave Kreskowiak29-Feb-08 3:27
mveDave Kreskowiak29-Feb-08 3:27 
GeneralCan't find appropriate control Pin
cstrader23228-Feb-08 3:32
cstrader23228-Feb-08 3:32 
GeneralRe: Can't find appropriate control Pin
Xmen Real 28-Feb-08 3:42
professional Xmen Real 28-Feb-08 3:42 
GeneralRe: Can't find appropriate control Pin
cstrader23228-Feb-08 4:01
cstrader23228-Feb-08 4:01 
GeneralRe: Can't find appropriate control Pin
Xmen Real 28-Feb-08 4:36
professional Xmen Real 28-Feb-08 4:36 
GeneralRe: Can't find appropriate control Pin
cstrader23228-Feb-08 4:57
cstrader23228-Feb-08 4:57 

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.