Show number of checked items when all items are checked.

1 Answer 175 Views
ComboBox
Mark
Top achievements
Rank 1
Iron
Mark asked on 17 May 2021, 09:54 PM

I have a radcombobox with checkboxes enabled and i would like to be able to see the total number of items checked in the header even when i click the "check all" checkbox.  Currently if you check one or two items you see a comma separated list of the items checked, if i were to check 4 items  it says "4 items checked", but if i click the "Check All" checkbox in the header then the caption just reads "All items checked". it is desirable for us to customize that message to say how many items actually are checked,  either using the same syntax "X items checked" or using a hybrid syntax like "All X items checked"...  

Is there a way to accomplish this behavior?  

 

Thanks!

-Mark

1 Answer, 1 is accepted

Sort by
1
Mark
Top achievements
Rank 1
Iron
answered on 18 May 2021, 02:34 PM

Ok, so i think i've answered my own question.  My solution is customize the Localization.AllItemsCheckedString right after i call .DataBind();

 

Like this:


chkListApplicantTo.DataBind();
chkListApplicantTo.Localization.AllItemsCheckedString = string.Format("All {0} items checked.", chkListApplicantTo.Items.Count.ToString("N0"));
Tags
ComboBox
Asked by
Mark
Top achievements
Rank 1
Iron
Answers by
Mark
Top achievements
Rank 1
Iron
Share this question
or