Reputation: 13
I need a simple custom DataGridviewCell to ... I can t explain exactly what i want
Suppose there is a cell containing a string ! I want to change(custom format) this string before shown! and if cell changed, save in previous format in underlying db;
Something like "Man in the middle" in network Hacking.
Upvotes: 0
Views: 156
Reputation: 3967
You can also use the event DataBindingComplete and from there apply you custom format to whatever column you want
Upvotes: 0
Reputation: 838
Sounds like you want to Specify a StringFormat.
You can use dataGridView1.Columns["columnName"].DefaultCellStyle.Format = "your format";
You can use FormattedValue
to work with the displayed value and Value
to work with the real value.
Upvotes: 1