This is a migrated thread and some comments may be shown as answers.

[Solved] How to set text in FooterTemplate

1 Answer 215 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Marko Gluhak
Top achievements
Rank 1
Marko Gluhak asked on 14 Apr 2009, 10:09 PM
Hi,

I have this control on aspx page:
<telerik:RadComboBox ID="drpMjesto" runat="server" EnableLoadOnDemand="True" EnableTextSelection="False" LoadingMessage="Učitavanje..."  OnItemsRequested="drpMjesto_ItemsRequested" Skin="Telerik" ItemRequestTimeout="500" NoWrap="True"><FooterTemplate><asp:Literal runat="server" ID="ltlMessage" Text="aaa"></asp:Literal>eee</FooterTemplate> 
</telerik:RadComboBox> 
 

In code behind I'm using this:

        protected void drpMjesto_ItemsRequested( object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e )  
        {  
 
            drpMjesto.DataSource = cSifMjesto.GetTopXByNaziv( 20, e.Text );  
            drpMjesto.DataTextField = "Naziv";  
            drpMjesto.DataValueField = "IdMjesto";  
            drpMjesto.DataBind( );  
 
            if ( !e.EndOfItems )  
            {  
                Literal ltl = ( Literal ) drpMjesto.Footer.FindControl( "ltlMessage" );  
                ltl.Text = "...prvih 20";  
            }  
        } 

Data that is populates is correct but I cannot get literal in footer to display message. Its always empty. On page_load I dont clear items or anything. Footer is always displaying aaaeee

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 16 Apr 2009, 01:32 PM
Hello Marko,

Thank you for contacting Telerik support.

The text of the footer cannot be set in ItemsRequested event handler,  because the ItemsRequested event is fired when a callback is initiated form the client-side, all properties that are being updated in the ItemsRequested event handler will lose the changes after the callback, only items can be added to the combobox.

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ComboBox
Asked by
Marko Gluhak
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or