Friday, January 9, 2009
Translating the standard items in a BindingNavigator
I was doing a little translation work on my code today, and needed to translate the "of {total number of rows}" that is displayed like "of 30" when you have a data source with 30 rows/objects/whatever in it. This is displayed in the BindingNavigator that you can use to navigate a DataGridView. So i set the Text-property of the bindingNavigatorCountItem-object to my translated formatstring and expected everything to be in order. That was not the case. It turns out, after some digging around, that there is a property on the BindingNavigator-class itself called CountItemFormat. Set this to your translated format, in my case (Norwegian) "av {0}", and you are good to go. Also remember to translate the ToolTips on the standard items, or just remove them if you don't need them.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment