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

set Localization-CheckAll Text

3 Answers 99 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Jérémy
Top achievements
Rank 1
Jérémy asked on 13 Feb 2015, 09:45 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 13 Feb 2015, 04:32 PM
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.

 
0
Jérémy
Top achievements
Rank 1
answered on 16 Feb 2015, 08:22 AM
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);
}
0
Ivan Danchev
Telerik team
answered on 19 Feb 2015, 08:27 AM
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.

 
Tags
ListBox
Asked by
Jérémy
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Jérémy
Top achievements
Rank 1
Share this question
or