2
Answers

Limiting decimals

Ask a question
George Laing

George Laing

15y
2.4k
1

Hi

 I have a numeric column on a datagrid that I am putting into a textbox, The problem is that the value has 4 decimal places and I want to show no decimals. I am not sure though how to convert it to a decimal. pPrem_Optimized in the grid has 4 decimals I want it to show in the textbox with none. Here is the line does anyone know how to limit it to no decimals?

prem_OptimizedTextBox.Text = Grid_Property.Rows[e.RowIndex].Cells["pPrem_Optimized"].Value.ToString();

Thanks


Answers (2)
Next Recommended Forum