I have a small windows client application data bound to a single table backend.
I created a DataSet using the wizard in VS 2005, and it automatically create the underlying adapter and a GridView. I also have a RichText control and bound it to this DataSet. All well so far but, I need to replace certain characters(~) on the fly before the data is shown in the RichTextbox. Can this be done.
Rich Text Box. .NET 2.0 Content formatting
.netrichtextbox
Best Solution
You need to handle the
Format
andParse
events of the Binding.In the
Format
event, convert the internal value to the formatted representation :In the
Parse
event, convert the formatted representation to the internal value :Note that you only need to handle the
Parse
event if your binding is two-way (i.e. the user can modify the text and the changes are saved to the database)