0

Hi Alls,

I really need help from u all regarding how to update database using checkbox in datagridview.... i got 4 columns from my access database that is:-

Columns1 = Id
Coulmn2 = Name
Columns3 = Status
Columns4 checkbox =

I need to update any data in column that have checked...how to that...can anyone help me?...plzzzzzzzzzzzz

2
Contributors
5
Replies
9
Views
8 Years
Discussion Span
Last Post by kerek2
0
for Each gvrow As GridViewRow in GridView1.Rows)
Dim cb As CheckBox = (CheckBox)gvrow.FindControl("CheckBox1")
          Dim chkstate As Boolean = cb.Checked
            'perform ur action(updation)
            if (chkstate = true)
                            'updation
                break
            end If
       Next
0

Already had with this code:,

Dim column As DataGridViewColumn = New DataGridViewCheckBoxColumn
column = New DataGridViewCheckBoxColumn
column.DataPropertyName = "STATUS"
column.Name = "RECOMMENDED ?"

Me.DataGridView1.Columns.Add(column)
Me.DataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter

so how to update the database?..ekekekeke...tq

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.