How to search and autopopulate records in an all editable gridview asp.net
Please help how can i implement this using all editable gridview
i would also like the other datagridview to view to automatically be refrehed by the corresponding searched record
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim bn As Form
If KeyAscii = 8 Then 'backspace key pressed - Ascii code 8
If Searchx = "" Then
Exit Sub
Else
If Len(Searchx >= 1) Then 'is there is a character to remove?
Searchx = Left(Searchx, Len(Searchx) - 1) 'delete end char
End If
End If
Else
Searchx = Searchx & Chr(KeyAscii) 'add new character to the string
'DoCmd.RunSQL ("searchalsoauthor '" & searchx & "'")
End If
Set bn = Forms![studentsearch]![ADDNEW].Form
bn.Requery
'Dim bn As control
' Set bn = Forms![Find]![Accountsearch].Form
'bn.Requery
End Sub
This is the storedprocedure
CREATE PROCEDURE [dbo].[nameschsearch](@s as nvarchar(50)) AS
SELECT * from student
WHERE ([Name] LIKE @s or [Name] LIKE '%'+@s+'%' or [Name] LIKE '%' + @s or [Name] LIKE @s + '%' AND ((student.Status) Is Null))
ORDER BY [Name]
GO
Last edited by Makumbi; Feb 10th, 2022 at 03:19 AM.