I use an editable DataGridViewWindows form to display a list of variables that may have different types of information, the format of which is unknown to the application: paths, lines, numbers, etc. The form uses source data binding.
Some of the values may be long, and I would like to display them on several lines, rather than on a long, partially visible line. The original WrapModedoes not fit in my case, because it breaks the lines into space characters that are not always present: typical examples are a long PATH variable consisting of semicolon-separated or hexadecimal digits.
The flow lines at the border of the form, and not at certain symbols, will be good, although only if necessary will it be better. Adding other split positions instead of space characters would only be better.
Performance: the count of grid lines will never be very high: usually from 0 to 10, can be higher, for example, 50, in some extreme cases, and usually the maximum length of each of them should not exceed 4 or 5 lines when packing. So this is not a big problem.
How do you recommend doing this?
- handles an event
CellFormattingby inserting characters \rand deleting them when parsing a fixed value? The problem is that the cell seems to have its own way of reformatting the text in input mode, changing its aspect when switching between the two modes. Perhaps other side effects have not yet been detected ... WrapMode, ?