Hi,
my requirement is filter the records on typing in keyword in textbox.
EX:
string:Test Record
string :filter Test
string: Record1
if i type 'T' only Test Record should populate.
if i type 'R' Record1 should populate.
i tried below
string.match('T')-it will match the string having 'T'
but i need to filter -if filter search is 'T' or 'Te' or 'Tes'
Expected:string starting with 'T' or 'Te' or 'Tes' should populate (i.e Test Record not filter Test)
Veerendra AnnigerePosted Dec 24, 2019, 3:47 AM
Check this link- https://primefaces.org/primeng/#/autocomplete
VikasPosted Dec 5, 2019, 11:38 PM
Ramachandran MPosted Dec 5, 2019, 11:30 PM
"Test Record",
"filter Test",
"filter Test"};
// Using foreach - loop to check
// each possible match
foreach (string s in strmatch)
{
// To check match second possibility
if (s.contains(txtPassport.Text.Trim()))
{
// Display the result
Console.WriteLine(s);
return;
}
}