Use
DataFormatString
property.
Use
'F or f: Displays numeric values in fixed format. You can specify the number of decimal places.'. For six decimal places:
<asp:BoundField DataField="totaldata" HeaderText="Total Data"
ReadOnly="True" SortExpression="totaldata" DataFormatString="{0:F6}" />
Details here:
BoundField.DataFormatString Property [
^]
UPDATE:
If I am correct, all you are doing right now is binding a datatable to a grid and put 'AutoGenerateColumns=true'.
What I am meant by creating bound column is, set AutoGenerateColumns=false and then define the columns as bound columns in your designer. Map the columns to expected fields. Doing this would give you option to format columns. Use DataFormatString for your desired column here.
Alternative:
In case, you don't want to do this, then there is other option too. You can format the value from the source itself OR before binding. So, if you are getting the data from DB, get the data in formatted way such that only 3 decimal is shown. If you are hesitant in doing this at DB level then you can do this in your business logic layer (if it exists!). Just before binding the table to grid, create a foreach loop on the datatable rows. For the column in discussion, get the value and modify/update it as per need. Once the loop is done, you can use the new/updated datatable to bind with grid.