Hey,
I'm attempting to replicate this demo ( http://demos.telerik.com/aspnet-ajax/combobox/examples/programming/addremovedisableitemsclientside/defaultcs.aspx ). The gist is that I need to either disable or hide items after they've been selected by the user. The issue I am having is that the hiding or disabling of an item is not persisted over a postback caused by the AutoPostBack property of the ComboBox.
This seems like it should be trivial based on the 'Preserving Changes' section of http://www.telerik.com/help/aspnet-ajax/combo_clientsidebasics.html
ComboBox declaration (LinqDataSource for feeding data):
JavaScript IndexChanging:
Forgot to mention, .NET 4, VS 2010, Q12010 Telerik Release.
Any suggestions?
Cheers.
I'm attempting to replicate this demo ( http://demos.telerik.com/aspnet-ajax/combobox/examples/programming/addremovedisableitemsclientside/defaultcs.aspx ). The gist is that I need to either disable or hide items after they've been selected by the user. The issue I am having is that the hiding or disabling of an item is not persisted over a postback caused by the AutoPostBack property of the ComboBox.
This seems like it should be trivial based on the 'Preserving Changes' section of http://www.telerik.com/help/aspnet-ajax/combo_clientsidebasics.html
ComboBox declaration (LinqDataSource for feeding data):
<telerik:RadComboBox ID="SearchPeopleAttribute" runat="server" AutoPostBack="true" Skin="Windows7" AllowCustomText="true" DataSourceID="SearchPeopleAttributeDS" EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" EnableLoadOnDemand="true" ItemsPerRequest="30" EnableItemCaching="true" Filter="Contains" ShowMoreResultsBox="true" DataTextField="Name" DataValueField="DepartmentPersonAttributeID" EmptyMessage="Search person attribute..." OnClientSelectedIndexChanging="SearchPeopleAttribute_SC" OnSelectedIndexChanged="SearchPeopleAttribute_SelectedIndexChanged" Width="175px" />JavaScript IndexChanging:
function SearchPeopleAttribute_SC(sender, eventArgs) { var item = eventArgs.get_item(); var combo = $find("<%= SearchPeopleAttribute.ClientID %>"); //alert(combo.get_id()); combo.trackChanges(); //alert(item.get_text()); item.disable(); combo.commitChanges(); }Forgot to mention, .NET 4, VS 2010, Q12010 Telerik Release.
Any suggestions?
Cheers.