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

TreeListNumericColumn improperly converting sql read data type in edit

0 Answers 22 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
G716
Top achievements
Rank 1
G716 asked on 26 Apr 2017, 12:04 AM

When editing numbers in a TreeListNumericColumn, some fractions are rounded down if the SQL data type is real.  E.g. 1.4 shows up in read mode, but in edit mode it is 1.39. This does not happen with the RadGrid box. See the picture attached. It's a tree list and a rad grid - both using the same SQL data source.

Source code:

 

<telerik:RadTreeList runat="server" DataSourceID="sql" ParentDataKeyNames="parent_id" DataKeyNames="id" Caption="TreeList"
    EditMode="InPlace">
    <Columns>
        <telerik:TreeListEditCommandColumn ShowAddButton="false" />                   
    </Columns>
</telerik:RadTreeList>
<br /><br />
<telerik:RadGrid runat="server" DataSourceID="sql" AllowAutomaticUpdates="true" MasterTableView-Caption="Grid" >              
    <MasterTableView EditMode="InPlace">
 
        <Columns>
            <telerik:GridEditCommandColumn />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:SqlDataSource runat="server" ID="sql" ConnectionString="<%$ ConnectionStrings:SqlDB%>" CancelSelectOnNullParameter="false"
    SelectCommand="select 0 id, convert(real, 1.4000) real_value, convert(decimal(10,4), 1.4) decimal_value, null parent_id " />

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
G716
Top achievements
Rank 1
Share this question
or