Results 1 to 1 of 1

Thread: How to search and autopopulate records in an all editable gridview asp.net

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2020
    Location
    Kampala
    Posts
    39

    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
    Attached Images Attached Images  
    Last edited by Makumbi; Feb 10th, 2022 at 03:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width