hi, all
I want to delete row which point value = 1 form datatable.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Riya SehgalPosted Jul 6, 2011, 4:18 AM
You can try with below code.
sqlcmd = New SqlCommand("select * from emp", sqlcon)
sqlcon.Open()
da = New SqlDataAdapter(sqlcmd)
dt.Clear()
da.Fill(dt)
If dt.Rows.Count > 0 Then
'Here i delete "First" row and bind it in grid view
dt.Rows(1).Delete()
GridView1.DataSource = dt
GridView1.DataBind()
End If