I want to search data from ms access table having special characters(below is the example):
CCTM-2PM/PA/14-4-1-F-SC,
CCTM-2PM/PA/18-4-5-F-SC,
CCTM-2PM/PA/33-20-4-F-SC,
CCTM-2PM/PA/36-20-6-F-SC,
CCTM-2PM/PS/22-10-1-F-SC,
CCTM-2PM/PS/22-4-3-F-SC,
CCTM-2PM/PS/33-20-4-F-SC(L),
CCTM-2PM/PS/33-7-9-F-SC,
CCTM-2PM/R-22-4-3-M-SC
The nearest match(s) results should be displayed in datagrid/combobox as you type.
is there any way to do this??
This may not be the cleanest solution, but you could fill an IEnumerable object type with all the possible values of that field (let’s call it
values), and then query the object using LINQ:This will collect 10 values (5 before the text typed in the txtSearch textbox, and 5 after it). Then the datagrid could be filled with these values.