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
175
copy/paste issue with other culture
posted

 Hi,

 I have a UltraWebGrid, I use a custom column where I format the numbers with an webnumericedit where the culture is set on "nl-NL"

    <igtxt:WebNumericEdit ID="wneFloatEditor" runat="server" DataMode="Double" MaxLength="20"
      MinValue="0" Width="100px" Culture="nl-NL" MinDecimalPlaces="Two">
    </igtxt:WebNumericEdit>

 the column definition looks like this:

 <igtbl:UltraGridColumn IsBound="True" Key="Hoeveelheid" BaseColumnName="Hoeveelheid"
              Type="Custom" EditorControlID="wneFloatEditor">
              <Header Caption="Aantal">
                <RowLayoutColumnInfo OriginX="3" />
              </Header>
              <CellStyle HorizontalAlign="Right" />
              <Footer>
                <RowLayoutColumnInfo OriginX="3" />
              </Footer>
            </igtbl:UltraGridColumn>

 

In this culture (nl-NL) the decimals are separated by coma (English => 2.25 ,Dutch=> 2,25). If I copy and paste this value, then I get 225 instead of 2,25 as I should.

Please help 

Parents
No Data
Reply
  • 14049
    Offline posted
    There is a way to specify whether you would like to put formatted or
    non-formatted text into the clipboard.
    Inside of the BeforeClipboardOperation event handler, check the second
    and the third parameters that are passed in. The second parameter lets
    you know what kind of operation that is. You can compare it with
    igtbl_ClipboardOperation.Copy.
    The third parameter in the case of the copy operation allows to specify
    whether formatted or unformatted value should be copied.
    Try putting formatted values in the CB: options.copyFormatted = true;
    (it's false by default).
    Although this can play it down bad if you'll try to paste into another
    numeric column that don't have this editor attached... Another option
    could be to replace your decimal separator depending on which column
    it's being pasted to: with the editor it should be ',' without editor - '.'
    Hope this helps.
Children