Click here to Skip to main content
15,892,072 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DBNull... why doesn't this work?!?!?!! ( IIF ) Pin
Dougie the P5-Aug-09 18:07
professionalDougie the P5-Aug-09 18:07 
Questionwhich is faster? Pin
TheMrProgrammer25-Jul-09 19:00
TheMrProgrammer25-Jul-09 19:00 
AnswerRe: which is faster? Pin
Luc Pattyn25-Jul-09 22:34
sitebuilderLuc Pattyn25-Jul-09 22:34 
GeneralRe: which is faster? Pin
TheMrProgrammer26-Jul-09 5:08
TheMrProgrammer26-Jul-09 5:08 
GeneralRe: which is faster? Pin
Luc Pattyn26-Jul-09 8:41
sitebuilderLuc Pattyn26-Jul-09 8:41 
GeneralRe: which is faster? Pin
TheMrProgrammer27-Jul-09 4:13
TheMrProgrammer27-Jul-09 4:13 
GeneralRe: which is faster? Pin
Luc Pattyn27-Jul-09 11:03
sitebuilderLuc Pattyn27-Jul-09 11:03 
QuestionDatagridview checkbox column Pin
sreerajknair25-Jul-09 18:37
sreerajknair25-Jul-09 18:37 
Dear Members,
I have a datagridview in windows form. In this grid one column is datagridviewcheckboxcolumn. when i select the first checkbox and i click a save button in toolstrip it will not work. But the same code in command button it is worked. Please check the following code


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim arr As New ArrayList
Dim en As New TestEnity
en.Name = "name1"
arr.Add(en)
en = New TestEnity
en.Name = "name2"
arr.Add(en)
dgTest.DataSource = arr
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each row As DataGridViewRow In Me.dgTest.Rows
Dim checkBoxCell As DataGridViewCheckBoxCell = TryCast(row.Cells("dgvSelected"), DataGridViewCheckBoxCell)
If checkBoxCell IsNot Nothing Then
Dim checked As Boolean = CType(checkBoxCell.Value, Boolean)
If checked Then
MessageBox.Show("Row : " & row.Index & "Checked")
Else
MessageBox.Show("Row : " & row.Index & "Not Checked")
End If

End If
Next

End Sub

Private Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.Click
For Each row As DataGridViewRow In Me.dgTest.Rows
Dim checkBoxCell As DataGridViewCheckBoxCell = TryCast(row.Cells("dgvSelected"), DataGridViewCheckBoxCell)
If checkBoxCell IsNot Nothing Then
Dim checked As Boolean = CType(checkBoxCell.Value, Boolean)
If checked Then
MessageBox.Show("Row : " & row.Index & "Checked")
Else
MessageBox.Show("Row : " & row.Index & "Not Checked")
End If

End If
Next
End Sub
End Class
Public Class TestEnity
Dim _Name$
Public Property Name()
Get
Return _Name
End Get
Set(ByVal value)
_Name = value
End Set
End Property

sree

AnswerRe: Datagridview checkbox column Pin
Paramu197325-Jul-09 22:32
Paramu197325-Jul-09 22:32 
QuestionImport xml into ms access database Pin
tessers25-Jul-09 13:03
tessers25-Jul-09 13:03 
AnswerRe: Import xml into ms access database Pin
Christian Graus25-Jul-09 13:46
protectorChristian Graus25-Jul-09 13:46 
GeneralRe: Import xml into ms access database Pin
tessers25-Jul-09 22:32
tessers25-Jul-09 22:32 
GeneralRe: Import xml into ms access database Pin
elizas8-Feb-10 19:24
elizas8-Feb-10 19:24 
QuestionHow to Re-Update the SqlDataAdapter() Pin
Paramu197325-Jul-09 1:36
Paramu197325-Jul-09 1:36 
AnswerRe: How to Re-Update the SqlDataAdapter() [modified] Pin
Andy_L_J25-Jul-09 6:37
Andy_L_J25-Jul-09 6:37 
GeneralRe: How to Re-Update the SqlDataAdapter() Pin
Paramu197325-Jul-09 22:24
Paramu197325-Jul-09 22:24 
QuestionAgain Repeat : Outlook Share Add-In setup Working On Vista but not in Window XP Pin
dcdhingra25-Jul-09 0:31
dcdhingra25-Jul-09 0:31 
AnswerRe: Again Repeat : Outlook Share Add-In setup Working On Vista but not in Window XP Pin
Andy_L_J25-Jul-09 6:49
Andy_L_J25-Jul-09 6:49 
Questionproblem in date asve Pin
faravani24-Jul-09 21:53
faravani24-Jul-09 21:53 
AnswerRe: problem in date asve Pin
Mycroft Holmes24-Jul-09 23:18
professionalMycroft Holmes24-Jul-09 23:18 
QuestionMy application shows SPY and Virus Pin
Anubhava Dimri24-Jul-09 19:36
Anubhava Dimri24-Jul-09 19:36 
AnswerRe: My application shows SPY and Virus Pin
Christian Graus25-Jul-09 12:54
protectorChristian Graus25-Jul-09 12:54 
GeneralRe: My application shows SPY and Virus Pin
Anubhava Dimri26-Jul-09 18:12
Anubhava Dimri26-Jul-09 18:12 
QuestionVB6 and XP Taskbar Pin
starchaser0924-Jul-09 8:39
starchaser0924-Jul-09 8:39 
AnswerRe: VB6 and XP Taskbar Pin
Henry Minute24-Jul-09 9:48
Henry Minute24-Jul-09 9:48 

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.