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,355,35 5,355,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,3465,346 5,3465,346 5,346
in multiple formats, but never with all decimals in it
Kind Regards
Ralph Bariz
(AVL List GmbH)
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.
No, I want to SEE only as few digits, but I want to GET the complete data.
When I paste the data from excel into xamdatagrid(select cells in excel -> CTRL+C -> select a cell in the xamdatagrid -> CTRL+V), I get only whats visible in excel instead of the whole number(which you can see in the edit bar in excel). The reason is, xamdatagrid is using the text mime type for parsing the CLIPBOARD contents instead the XML Spreadsheet mime type. In the opposite I want to get the whole numbers in excel when I copy from xamdatagrid(select cells in xamdatagrid -> CTRL+C -> select a cell in excel -> CTRL+V). That is not working because xamdatagrid does not create the clipboardcontent with the whole data but only the shown.