Hey Guys,
The problem I am having is that the filtering functionality of the AutoCompleteBox is case sensitive.
I have names stored in the database with an uppercase first letter, so if a user enters a lower case letter into the autocompletebox, it does not display any results.
I have searched for properties within the control itself to work around this, but there seems to be none. Is there a way to handle the filtering method myself in the server code, or even the client?
I'm implementing a RadAutoCompleteBox to search through a list of items bound to the control using a LinqDataSource.
In the LinqDataSource, I am use the onselecting event to fetch the data.
protected void LinqDataSourceForAutoComplete_OnSelecting(object sender, LinqDataSourceSelectEventArgs e)
{
using (DataClassesDataContext dc = new DataClassesDataContext())
{
var membersUsers = (from ue in dc.UserEntities
join boe in dc.BusinessOwnerEntities on ue.ID equals boe.UserEntity.ID into j1
from j2 in j1.DefaultIfEmpty()
where j2 != null
select new
{
ID = ue.ID,
Description =
string.Format("{0}, {1}", ue.Surname,
ue.PreferredName != null ? ue.PreferredName : ue.FirstName)
}).ToList();
e.Result = membersUsers;
}
}
and here is the markup for the RadAutoCompleteBox
<telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1"
DataSourceID="LinqDataSourceForAutoComplete"
DataValueField="ID"
DataTextField="Description"
InputType="Token"
TextSettings-SelectionMode="Single"
Filter="Contains"
>
</telerik:RadAutoCompleteBox>
Any help on how I could get around this would be greatly appreciated!
The problem I am having is that the filtering functionality of the AutoCompleteBox is case sensitive.
I have names stored in the database with an uppercase first letter, so if a user enters a lower case letter into the autocompletebox, it does not display any results.
I have searched for properties within the control itself to work around this, but there seems to be none. Is there a way to handle the filtering method myself in the server code, or even the client?
I'm implementing a RadAutoCompleteBox to search through a list of items bound to the control using a LinqDataSource.
In the LinqDataSource, I am use the onselecting event to fetch the data.
protected void LinqDataSourceForAutoComplete_OnSelecting(object sender, LinqDataSourceSelectEventArgs e)
{
using (DataClassesDataContext dc = new DataClassesDataContext())
{
var membersUsers = (from ue in dc.UserEntities
join boe in dc.BusinessOwnerEntities on ue.ID equals boe.UserEntity.ID into j1
from j2 in j1.DefaultIfEmpty()
where j2 != null
select new
{
ID = ue.ID,
Description =
string.Format("{0}, {1}", ue.Surname,
ue.PreferredName != null ? ue.PreferredName : ue.FirstName)
}).ToList();
e.Result = membersUsers;
}
}
and here is the markup for the RadAutoCompleteBox
<telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1"
DataSourceID="LinqDataSourceForAutoComplete"
DataValueField="ID"
DataTextField="Description"
InputType="Token"
TextSettings-SelectionMode="Single"
Filter="Contains"
>
</telerik:RadAutoCompleteBox>
Any help on how I could get around this would be greatly appreciated!