Link to home
Start Free TrialLog in
Avatar of sykotex
sykotexFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Enabling editing in a gridview

Hi
I am populating a gridview with the code below, how can I enable editing like you get if setup through using the gui?
Using Visual Studio 2010 vb.net

        Dim conString = ConfigurationManager.ConnectionStrings("clientsConnectionString")
        Dim strConnString As String = conString.ConnectionString
        Dim myConnection As SqlConnection
        Dim myCommand As SqlDataAdapter
       
        myConnection = New SqlConnection(strConnString)

        myCommand = New SqlDataAdapter("SELECT matter,client,mattername FROM client1 where client like '%" & txtClient.Text & "%' and matter like '%" & txtMatter.Text & "%' and mattername like '%" & txtMattername.Text & "%'", myConnection)

        ' Create and fill a DataSet.
        Dim ds As DataSet = New DataSet()
        myCommand.Fill(ds)

        grdClientres.DataSource = ds
        grdClientres.DataBind()

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of sameer_goyal
sameer_goyal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial