right trim a column in a datagridview C#
Posted on 2012-03-15
I am looking to right trim data in a datagrid view, when I pull text from the database it right pads spaces up to the 255 I have specified (it is free text for the user to enter). If I RTRIM the data in SQL the column becomes read only.
Where is a listing of cell style formats like "C" in the example below ? Is there a "P" for percent, an "S" for string etc... ? I can find examples of using but not a list of available formats.
dataGridView.Columns["five_offinvoice"].DefaultCellStyle.Format = "C";