Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Copy/Paste from/to excel copies only visible decimals
posted

Hi,

How the subject says only the visible decimals are copied from/to excel.

If I copy something from excel, sadly only the XML Spreadsheet mimetype contains all decimals but not the text type.

XML Spreadsheet Snippet:

    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>
   </Row>
   <Row>
    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>
   </Row>
   <Row>
    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="Number">5.3456700000000001</Data></Cell>

Text Snippet:

5,35    5,35
5,35    5,35
5,35    5,35

On the other hand the usual copy operation of the xamdatagrid when 3 decimals are visible but the number is 5,34567 produces only

5,346    5,346
5,346    5,346
5,346    5,346

in multiple formats, but never with all decimals in it

Kind Regards

Ralph Bariz

(AVL List GmbH)

Parents
No Data
Reply
  • 22015
    posted

    Hello Ralph,

     

    Thank you for your post!

     

    I have been looking into it. If you want to show more than two digits after the floating point of the number, I can suggest to  create a style for the XamNumericEditor and place it in the resources of the XamDataGrid for example. In the style you have to set the Mask property of the XamNumericEditor. Here is an example for the mask double:5.16. Setting the Mask this way you would be able to enter(paste) 5 numbers before the floating point and 16 numbers after it in the cell of the XamDataGrid. More about the masks you can find on the following link: http://help.infragistics.com/doc/WPF/2014.2/CLR4.0/?page=xamInputs_Masks.html.

     

    Here is an example of the above mentioned style:

     

    <Style TargetType="{x:Type igEditors:XamNumericEditor}">

                        <Setter Property="Mask" Value="{}{double:5.16}"/>

                    </Style>

     

    Please do not hesitate to let me know if you have any further questions on this matter.

Children