TreeListNumericColumn improperly converting sql read data type in edit

1 posts, 0 answers
  1. G716
    G716 avatar
    6 posts
    Member since:
    Jan 2016

    Posted 25 Apr 2017 Link to this post

    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 " />
Back to Top