Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridViewCellValidating FormattedValue - Where is the value coming from?

$
0
0

So I am looking at a function that is being called on a cell validating, and it is passed the DataGridViewCellValidatingEventArgs, and you can see it has a property "FormattedValue." The issue I am trying to fix involves a control that inherits from the base Windows control. The data formats properly (to two decimal places, as specified in the form designer) on the form, but the data being saved to the DB is not formatted.

I thought perhaps the solution was that I needed to alter FormattedValue directly, but it is read only. So my question is: where is FormattedValue coming from? What is telling it "This is the formatted value?" I know this is a simplistic question, but I am having trouble parsing this particular problem.

Any help would be appreciated greatly. Thanks!


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>