|
-
Aug 15th, 2001, 01:26 PM
#1
Thread Starter
New Member
Allowing in cell editing in a Data-Bound Grid...
I am trying to allow users to make changes, and new rows etc to a data-bound grid displayed on a form. Does anyone have any experiance with this task? Below is the code I have so far:
_______________________________________________
Private Sub Form_Load()
Dim dbConnect As New clsDbConnect
Dim rsUsers As New ADODB.Recordset
Dim strSQL As String
' open the connection to the database
dbConnect.Connect
' define the SQL statement
strSQL = "SELECT UserName, UserPassword, UserLevelId FROM tblUsers ORDER BY UserName"
Set rsUsers.DataSource = dbConnect.ReturnRS(strSQL)
Set dtgUsersGrid.DataSource = rsUsers
With dtgUsersGrid
.AllowAddNew = True
.AllowDelete = True
.AllowUpdate = True
.AllowRowSizing = True
.RecordSelectors = True
End With
End Sub
___________________________________________
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|