This is a migrated thread and some comments may be shown as answers.

row value roundup problem

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gajanan
Top achievements
Rank 2
Gajanan asked on 15 Dec 2010, 05:01 AM
hi, all
i am using RadGrid in my application , i am binding the grid with database values and my db table contains some real data type field
for those values (real data type field) radgrid displaying wrong
for example :- in my table value is 13.4
my radgrid is showing this value like 13.3987654321

even i used data-format string expression then also it is displaying  wrong value
it's not rounding up that value.
i used following expression
{0:####0.###}
{0:F3}%
{0:000.0}

and the code is below
 <telerik:GridBoundColumn DataField="MinimumQuantityForOrdering" HeaderText="Min. Order Qty "
                                        UniqueName="MinimumQuantityForOrdering" DataFormatString ="{0:F3}%"
                                        AutoPostBackOnFilter="true" CurrentFilterFunction="GreaterThanOrEqualTo">
                                        <ItemStyle HorizontalAlign="Left" />
                                        <HeaderStyle  Width ="10%" Wrap="true" />
                                    </telerik:GridBoundColumn>

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 20 Dec 2010, 10:19 AM
Hello Gajanan,

I could not reproduce the issue in the attached sample. Try setting the DataType property of the column and see if it makes any difference.

Regards,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Gajanan
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
Share this question
or