Click here to Skip to main content
14,836,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.. Whether its possible to format a data grid view column for entering percentage only??


DataGridTextBoxColumn aCol4 = new DataGridTextBoxColumn();
aCol4.MappingName = "Percentage";
aCol4.HeaderText = "Percent";
aCol4.Width = 50;
aCol4.Alignment = HorizontalAlignment.Right;
aCol4.NullText = "0";
aCol4.TextBox.Enabled = true; 
aCol4.Format = "{0:P}%";
but its not working.need to set any other property?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900