Bollwerk

When I display a field that contains a tab character, the tab is displayed as a square. Is there a way to display tabs as spaces I guess I could do a String.Replace method on each field but that seems a bit awkward. Is there a property that can be set or a procedure that will not require each field to be examined

Thanks



Re: Windows Forms Data Controls and Databinding Tabs displayed as squares

Ken Tucker

There is no property you can use to get the tabs to show as spaces. I would use the String.Replace in the DataGridView's CellFormatting event to change the tabs to spaces.





Re: Windows Forms Data Controls and Databinding Tabs displayed as squares

Bollwerk

I was afraid of that. The problem with doing that is that the number of spaces represented by the tab is unknown so when the field gets written back to a file the formatting gets screwed up. Anyway, thanks for responding.

Cheers





Re: Windows Forms Data Controls and Databinding Tabs displayed as squares

Ken Tucker

If you change the Value in the CellFormatting event it only changes the value you are displaying not the value stored in the column





Re: Windows Forms Data Controls and Databinding Tabs displayed as squares

Bollwerk

Thanks, I'll give that a shot.

Cheers