3 Answers, 1 is accepted
0
Hi Dave,
You can use the GetStatisticsInfo method of RadDocument to obtain a DocumentStatisticsInfo object, which contains information about the following parameters as properties:
Kind regards,
Iva
the Telerik team
You can use the GetStatisticsInfo method of RadDocument to obtain a DocumentStatisticsInfo object, which contains information about the following parameters as properties:
- int PagesCount
- int SectionsCount
- int WordsCount
- int CharactersCount
- int SpacesCount
- int ParagraphsCount
- int LinesCount
Kind regards,
Iva
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
Jay
commented on 09 Oct 2023, 10:01 PM
Top achievements
Rank 1
Iron
Iron
Doesn't work. I have a document with 4759 characters but 61 spaces and 24 words. Yeah. Right. Total junk.
Dimitar
commented on 10 Oct 2023, 06:40 AM
Telerik team
Hi Jay,
I am sorry to hear about your experience with the control and that this functionality does not work. I want to investigate but without a document, I cannot do that. I would suggest creating a new post or a ticket and attaching a sample document there. This way we can see what is causing this and fix the issue.
I want to apologize for the inconvenience this issue is causing you.
Regards,
Dimitar
0
John
Top achievements
Rank 1
answered on 31 Jul 2013, 03:51 PM
What happened to this method on the RadDocument API and the online demo? I can't find either instance. This method would prove very helpful for tracking the character count of a document.
Thanks,
John
Thanks,
John
0
Hello John,
You can also use the properties of the DocumentStatisticsInfo class to prepare a different string using the properties listed in my previous post.
I hope this helps.
Regards,
Iva Toteva
Telerik
The statistics option was indeed removed from the UI of the demos in the latest versions. However, you can easily add a button in the Ribbon UI and handle the click event like this:
private
void
Statistics_Click(
object
sender, RoutedEventArgs e)
{
DocumentStatisticsInfo statisticsInfo =
this
.radRichTextBox.Document.GetStatisticsInfo();
MessageBox.Show(statisticsInfo.ToString(),
"Document Statistics"
, MessageBoxButton.OK);
}
You can also use the properties of the DocumentStatisticsInfo class to prepare a different string using the properties listed in my previous post.
I hope this helps.
Regards,
Iva Toteva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>