The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
When I use an AutoComplete component with a TextBox and override the MatchItem event handler (I want to use a "contains" match rather than "starts with"), I'm unable to match with the desired column. In the code sample below, I'm hoping to match on the "Desc" column rather than the "Code" column in the underlying data source but it always seems to find matches in the "Code" column. In my overridden MatchItem event handler, the PossibleMatch property of the AutoCompleteMatchItemEventArgs is always a value from the "Code" column. The "Code" column happens to be the first column in the underlying data source. Any ideas?
AutoCompleteDataColumnInfo info = new AutoCompleteDataColumnInfo ("Desc", 100, true); info.MatchingColumn = true; autoComplete.Columns.Add (info);
AutoCompleteDataColumnInfo info2 = new AutoCompleteDataColumnInfo ("Code", 100, true); autoComplete.Columns.Add (info2);
ARAnupama Roy Syncfusion Team November 30, 2006 02:43 PM UTC
Hi Mark,
I was able to reproduce the issue here and tried a workaround for this.However,that has not worked successfully.I am still looking into the source to find some other way to help you out.Meanwhile I will go ahead and log a bug report so that we can address this issue at the earliest.
Regards,
Anu.
ARAnupama Roy Syncfusion Team November 30, 2006 03:42 PM UTC
Hi Mark,
As the args.PossibleMatch is returning data from the first column itself,I tried getting the items of the other columns from the internal Table Data of AutoComplete and code for that is the below given one.By changing the index within ItemArray to the desired column index,you can get the items in that column.Could you please check out whether it helps you out in any ways?
foreach(DataRow itemRow in this.autoComplete1.TableData.Rows)
{ possibleMatch1= (string)itemRow.ItemArray[1];//Give desired column index instead of 1.
MessageBox.Show (possibleMatch1);
}
Regards,
Anu.
ADAdministrator Syncfusion Team December 1, 2006 01:57 AM UTC
Hi Anu, Thanks for the reply and info. The code you posted looks promising, but I can't think of how to make it work when the MatchItem event fires.
...if only the args parameter here had the ItemArray the way the ItemSelected does.
>Hi Mark,
As the args.PossibleMatch is returning data from the first column itself,I tried getting the items of the other columns from the internal Table Data of AutoComplete and code for that is the below given one.By changing the index within ItemArray to the desired column index,you can get the items in that column.Could you please check out whether it helps you out in any ways?
foreach(DataRow itemRow in this.autoComplete1.TableData.Rows)
{ possibleMatch1= (string)itemRow.ItemArray[1];//Give desired column index instead of 1.
MessageBox.Show (possibleMatch1);
}
Regards,
Anu.
ARAnupama Roy Syncfusion Team December 1, 2006 02:41 PM UTC
Hi Mark,
I am afraid,I could not make it work.I have logged a bug report in this regard and you can track the progress of bug fix through the below given link.