We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Howto: format text in currentcell through PrepareViewStyleInfo event

Thread ID:

Created:

Updated:

Platform:

Replies:

9318 Dec 12,2003 10:02 PM UTC Dec 12,2003 10:55 PM UTC WinForms 1
loading
Tags: GridControl
Peter
Asked On December 12, 2003 10:02 PM UTC

How can i format the text in the current cell through the PrepareViewStyleInfo event? The problem was probably done by design since one may need to edit the contents of a cell and not their formatted view; The problem i have is 1. datatable has a column of phonenumbers which are just strings with the numeric portion of the numbers 2. dataview bound to the grid needs to be able to filter the numbers (portions and whole) 3. grid is readonly for selection only 4. if the current cell is in the phone number column the text inside is is unformatted currently im using e.Style.Text = formattedNumber; how can i workaround this feature?

Administrator [Syncfusion]
Replied On December 12, 2003 10:55 PM UTC

You can use CurrentCellInitializeControlText to strip out the extra characters from the text you want to see when the cell starts to edit. You can then use SaveCellFormatted to put these characters back in. Here is a little sample. You could also use a MaskEdit cell for your phone numbers.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;