Hi
I'm new programmer and i have never worked with tools before in VS , Yesterday i spent a lot of time trying to figure out how to work with the eo.Grid and damn how bad i found my self at programming XD
So moment ago i completely gave up and i want some help :(
I looked up the samples but it's only a demo that show me how it will looks like and not how to code it, Also i searched the forums and Googled it and i found nothing :(
#1
The things i want is, To select a row from a grid and from it's cells i want to fill the textboxes that i have placed in the page
I tried the ItemCommand sample
Code: Visual Basic.NET
Protected Sub Grid1_ItemCommand(sender As Object, e As EO.Web.GridCommandEventArgs)
If e.CommandName = "select" Then
Dim s As String = String.Empty
s += "Row Index:" + e.Item.Index.ToString()
s += "<br />Posted At:" + e.Item.Cells(1).Value.ToString()
s += "<br />Posted By:" + e.Item.Cells(2).Value.ToString()
s += "<br />Topic:" + e.Item.Cells(3).Value.ToString()
lblInfo.Text = s
End If
End Sub
But the event didn't trigger, I have putted the grid in a callbackpanel and changed the properties of RunningMode to callback, Is there something else i should do ?
#2
I also wanted to delete a row from a grid and i know that it only delete from a client side and not from the database, But how do handle it after i delete couple of rows ?
I have searched and learned from other topics and this is what got to
Code: Visual Basic.NET
Protected Sub Grid1_ItemDeleted(sender As Object, e As EO.Web.GridItemEventArgs) Handles Grid1.ItemDeleted
Dim con As SqlConnection = New SqlConnection(WebConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)
For i = 0 To Grid1.RecordCount - 1
If Grid1.Items(i).Deleted Then
Dim cmd As New SqlCommand("Delete from tblClinic where ID=" & Grid1.Items(i).Cells(3).Value & "", con)
con.Open()
cmd.ExecuteReader()
con.Close()
End If
Next
End Sub
But it delete all the rows and not the one that are deleted from the grid
And i noticed that it triggered after any post-back happen like pressing a button, Is there a way to trigger after i delete single row immediately?
#3
And last the update row i have no idea how to do it :(
I know i'm asking a lot but i don't know what else to do, I hope there's someone who's kind enough to spare me some of his valuable time to help me out with this one.
And sorry for my poor English :(
Thanks.