help delete all rows from ultragrid

dicky18

Member
Joined
Sep 22, 2005
Messages
23
Location
bangkok
Programming Experience
Beginner
:confused:
hi im using vb.net i need help to delete all rows from ultragrid
the coding is different from the datagrid
any one has any ideas

i have this code but in datagrid but i want ultragrid
coz ultragrid1.item(x,1) doesnt exist

Try
Dim dt As DataTable
dt = Me.Orderdetailds1.Tables("Product")
For x As Integer = 0 To Orderdetailds1.Tables("Product").Rows.Count - 1
If DataGrid1.Item(x, 0) = False Then
Else
Dim no As Integer
no = DataGrid1.Item(x, 1)
Dim s As String
Con = New SqlConnection("server=200.100.100.100;user id=sa;pwd=hello;database=demo;")
Con.Open()
s = "delete products where productid=" & no & ""
cmd = New SqlCommand(s, Con)
cmd.ExecuteNonQuery()

End If
Next
 
Well what members does the UltraGrid have? You're using it so you should know. Do you have any documentation for it? Have you looked through the Intellisense listing or the Object Browser?
 
Back
Top