I am using Radcombo box inside a Telerik grid. The aspx code is below for this control:
<EditItemTemplate>
<telerik:RadComboBox runat="server" TabIndex="4" ID="rdcmbgrdFesIssuingCompany" EnableLoadOnDemand="True"
DataTextField="carriername" DataValueField="carriernameid" AutoPostBack="true"
HighlightTemplatedItems="true" ShowDropDownOnTextboxClick="false"
ItemsPerRequest="10" EnableVirtualScrolling="true"
OnClientBlur= "ValidateCombinations" OnItemsRequested="RdCmbIssuingCompany_ItemsRequested"
OnSelectedIndexChanged="RdCmbIssuingCompany_SelectedIndexChanged" Filter="StartsWith"
OnClientItemsRequesting="OnClientItemsRequesting" OnClientItemsRequested="OnClientItemsRequested"
OnClientFocus="OnClientFocus" OnClientDropDownOpening="OnClientDropDownOpening" MinFilterLength="0"
ShowMoreResultsBox="false" NoWrap="true" DropDownAutoWidth="Enabled" OnClientDropDownOpened="OnRadDropDownOpened"
OnClientSelectedIndexChanged="isTabActive" CausesValidation="true" CssClass="ovfl-hidden">
</telerik:RadComboBox>
</EditItemTemplate>
OnItemRequsted below server side event has been called:
Protected Sub RdCmbIssuingCompany_ItemsRequested(ByVal sender As Object, _
ByVal e As _
RadComboBoxItemsRequestedEventArgs)
Carriers.Tables(0).DefaultView.RowFilter = String.Empty
Dim dvCarrier As DataView = Carriers.Tables(0).DefaultView()
e.Text = e.Text.Replace("%", "[%]")
e.Text = e.Text.Replace("'", "[']")
'For Issuing
dvCarrier.RowFilter = "Issuing=1 and carriername like'" _
& e.Text & "%'"
e.Message = dvCarrier.Count
Dim comboBox As RadComboBox = DirectCast(sender, RadComboBox)
Dim itemMessage As New RadComboBoxItem()
' Clear the default Item that has been re-created from ViewState at this point.
comboBox.Items.Clear()
dvCarrier.RowFilter = "Issuing=1"
Dim endOffset As Integer = Math.Min(e.NumberOfItems + 10, dvCarrier.Count)
comboBox.DataSource = dvCarrier
comboBox.DataBind()
End Sub
Now when user type text in this control then first it shows all datalist and a "loading" processing text and then it shows the filtered result to the user. For which i have attached the screen shot namely 1 (before server side event called) and 2 (after server side event called).
Now the expected result is that after typing the text in the control it must first filter the record then show the filtered data to the user directly. it should not show the unfiltered data to the user like in first screen shot.
So any idea/suggestion will be helpful.
<EditItemTemplate>
<telerik:RadComboBox runat="server" TabIndex="4" ID="rdcmbgrdFesIssuingCompany" EnableLoadOnDemand="True"
DataTextField="carriername" DataValueField="carriernameid" AutoPostBack="true"
HighlightTemplatedItems="true" ShowDropDownOnTextboxClick="false"
ItemsPerRequest="10" EnableVirtualScrolling="true"
OnClientBlur= "ValidateCombinations" OnItemsRequested="RdCmbIssuingCompany_ItemsRequested"
OnSelectedIndexChanged="RdCmbIssuingCompany_SelectedIndexChanged" Filter="StartsWith"
OnClientItemsRequesting="OnClientItemsRequesting" OnClientItemsRequested="OnClientItemsRequested"
OnClientFocus="OnClientFocus" OnClientDropDownOpening="OnClientDropDownOpening" MinFilterLength="0"
ShowMoreResultsBox="false" NoWrap="true" DropDownAutoWidth="Enabled" OnClientDropDownOpened="OnRadDropDownOpened"
OnClientSelectedIndexChanged="isTabActive" CausesValidation="true" CssClass="ovfl-hidden">
</telerik:RadComboBox>
</EditItemTemplate>
OnItemRequsted below server side event has been called:
Protected Sub RdCmbIssuingCompany_ItemsRequested(ByVal sender As Object, _
ByVal e As _
RadComboBoxItemsRequestedEventArgs)
Carriers.Tables(0).DefaultView.RowFilter = String.Empty
Dim dvCarrier As DataView = Carriers.Tables(0).DefaultView()
e.Text = e.Text.Replace("%", "[%]")
e.Text = e.Text.Replace("'", "[']")
'For Issuing
dvCarrier.RowFilter = "Issuing=1 and carriername like'" _
& e.Text & "%'"
e.Message = dvCarrier.Count
Dim comboBox As RadComboBox = DirectCast(sender, RadComboBox)
Dim itemMessage As New RadComboBoxItem()
' Clear the default Item that has been re-created from ViewState at this point.
comboBox.Items.Clear()
dvCarrier.RowFilter = "Issuing=1"
Dim endOffset As Integer = Math.Min(e.NumberOfItems + 10, dvCarrier.Count)
comboBox.DataSource = dvCarrier
comboBox.DataBind()
End Sub
Now when user type text in this control then first it shows all datalist and a "loading" processing text and then it shows the filtered result to the user. For which i have attached the screen shot namely 1 (before server side event called) and 2 (after server side event called).
Now the expected result is that after typing the text in the control it must first filter the record then show the filtered data to the user directly. it should not show the unfiltered data to the user like in first screen shot.
So any idea/suggestion will be helpful.