Alternate and easy way:
set the DataFormatString of Databound field
Format: {0:F}
1234.567 -> 1234.57
Format: {0:F3}
1234.567 -> 1234.567
for eg:
DataFormatString ="{0:F3}"
in aspx page design mode
single click on gridView1
then click on ">" of gridView1
then click on 'Edit Columns'
then select respective field and set 'DataFormatString'
you can also view the following link
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.dataformatstring.aspx
please tell me if i m confusing you