Hi All,
Here's what I got:
I have a RadCombobox that has three specific challenges: (1) the recordset is so large that I need LoadOnDemand-style functionality and (2) the combobox needs to be inside a asp.net repeater. Since it needs to be in a repeater, I do not see this demo working: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultvb.aspx
Here is the technique I'm currently attempting:
1. Here is the RadCombobox declaration:
2. When the user types, OnClientItemsRequesting fires:
3. The JS above writes the user's typing to the following hidden textbox:
4. Then, I'm trying to get the following DS declaration to update my RadCombobox:
So, the bottom line is that the EnableAutomaticLoadOnDemand the property does not seem to be "re-firing" my datasource with the users typed values. I'm wondering if (1) their is a way to force these RadComboboxes in the repeaters to fire when the JS above fires or (2) their is another technique that might work.
Thanks a ton for the help!
Jim
Here's what I got:
I have a RadCombobox that has three specific challenges: (1) the recordset is so large that I need LoadOnDemand-style functionality and (2) the combobox needs to be inside a asp.net repeater. Since it needs to be in a repeater, I do not see this demo working: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultvb.aspx
Here is the technique I'm currently attempting:
1. Here is the RadCombobox declaration:
<
telerik:RadComboBox
ID
=
"PositionRCB"
Runat
=
"server"
OnClientItemsRequesting
=
"onItemsRequesting"
DataSourceID
=
"PositionDS"
DataTextField
=
"Info"
DataValueField
=
"PK"
MarkFirstMatch
=
"True"
Width
=
"125px"
ShowToggleImage
=
"True"
Filter
=
"Contains"
EnableAutomaticLoadOnDemand
=
"True"
ItemsPerRequest
=
"15"
>
</
telerik:RadComboBox
>
2. When the user types, OnClientItemsRequesting fires:
<
script
type
=
"text/javascript"
>
function onItemsRequesting(sender, eventArgs) {
var positionText = eventArgs.get_text();
document.getElementById("<%= HiddenTB_Position.ClientID %>").value = positionText
}
</
script
>
3. The JS above writes the user's typing to the following hidden textbox:
<
asp:TextBox
ID
=
"HiddenTB_Position"
runat
=
"server"
Text
=
"Grot"
></
asp:TextBox
>
4. Then, I'm trying to get the following DS declaration to update my RadCombobox:
<
asp:SqlDataSource
ID
=
"PositionDS"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:DatabaseCargoMM1 %>" SelectCommand="usp_PickCity" SelectCommandType="StoredProcedure">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"HiddenTB_Position"
PropertyName
=
"Text"
Type
=
"String"
Name
=
"Param1"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
So, the bottom line is that the EnableAutomaticLoadOnDemand the property does not seem to be "re-firing" my datasource with the users typed values. I'm wondering if (1) their is a way to force these RadComboboxes in the repeaters to fire when the JS above fires or (2) their is another technique that might work.
Thanks a ton for the help!
Jim