set Localization-CheckAll Text

4 posts, 0 answers
  1. Jérémy
    Jérémy avatar
    19 posts
    Member since:
    Feb 2015

    Posted 13 Feb 2015 Link to this post

    Hello,

    I want to know if is possible to set the Location-CheckAll text in the code behind ?

    For exemple :

    Page.ascx :
    ...
    <telerik:RadListBox ID="lstBoxFluide" CheckBoxes="true" ShowCheckAll="true" Width="220px"
                                            AutoPostBack="true" Height="100px" runat="server" OnItemCheck="LstBox_ItemCheck" OnCheckAllCheck="LstBox_CheckAllCheck"
                                            OnClientSelectedIndexChanging="OnClientSelectedIndexChanging">
    </telerik:RadListBox>
    ...


    Page.cs
    ...
    lstBoxFluide.setLocalization-CheckAll = "Tous les fluides";
    ..


    Thank
  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 13 Feb 2015 Link to this post

    Hello,

    Here's how to change the CheckAll property's value in code-behind from the OnCheckAllCheck event handler

    <telerik:RadListBox ID="list1" runat="server" CheckBoxes="true" ShowCheckAll="true" AutoPostBack="true" OnItemCheck="list1_ItemCheck" OnCheckAllCheck="LstBox_CheckAllCheck">

    protected void LstBox_CheckAllCheck(object sender, Telerik.Web.UI.RadListBoxCheckAllCheckEventArgs e)
    {
        list1.Localization.CheckAll = "All States";
    }


    Regards,
    Ivan Danchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jérémy
    Jérémy avatar
    19 posts
    Member since:
    Feb 2015

    Posted 16 Feb 2015 in reply to Ivan Danchev Link to this post

    Thank a lot.

    I'm sorry, maybe it's a stupid question but, it will work if I put it on the Event  " protected override void OnInit(EventArgs e)" ? Like this :

    protected override void OnInit(EventArgs e){
    ....
        lstBoxFluide.Localization.CheckAll = "Tous les fluides";
    ....
        base.OnInit(e);
    }
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 19 Feb 2015 Link to this post

    Yes you can do that. It will set the text of the CheckAll property to "Tous les fluides" when the control is loaded.

    Regards,
    Ivan Danchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top