Aug 31, 2016, 9:18 PM
[CLOSED] TextArea, Past from Excel
Hello, I have a serious problem.
If I paste some cells (eg, 5 rows and 5 columns) from Excel in the textArea of my example
in
With
How can I preserve
It is not important that it is a textarea.
Tks
If I paste some cells (eg, 5 rows and 5 columns) from Excel in the textArea of my example
in
DATA_CLIPBOARD
I lose characters \r
at the end of each line and leaves only \n
With
window.clipboardData.getData('Text')
you can see that each line ends with \r\n
How can I preserve
\r\n
copying the clipboard in a ext.net control.It is not important that it is a textarea.
<html>
<head id="Head1" runat="server">
<title>Ext.NET Examples</title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
List<object> data = new List<object>();
if (!X.IsAjaxRequest)
{
}
}
public void cmdWindowAlternativeCopyMethodContinue_DirectClick(object sender, DirectEventArgs e)
{
string CLIPBOARDDATA = txtAlternativeAreaCLIPBOARDDATA.Text;
}
public void cmdWindowAlternativeCopyMethodContinue2_DirectClick(object sender, DirectEventArgs e)
{
string DATA_CLIPBOARD = e.ExtraParams["DATA_CLIPBOARD"];
}
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Default" />
<ext:Window ID="Window1" runat="server" Width="1200" Height="700" Layout="FitLayout">
<Items>
<ext:FormPanel ID="FormPanel1" runat="server" Layout="FitLayout">
<Items>
<ext:TextArea ID="txtAlternativeAreaCLIPBOARDDATA" runat="server" EmptyText="Paste here data from clipboard..." Region="Center" Height="110" MarginSpec="0 0 0 0">
</ext:TextArea>
</Items>
</ext:FormPanel>
</Items>
<Buttons>
<ext:Button ID="Button6" runat="server" Text="Continue" Icon="ForwardBlue" Margins="0 25 0 0">
<DirectEvents>
<Click OnEvent="cmdWindowAlternativeCopyMethodContinue_DirectClick" >
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="Past from clipboard" Icon="ForwardBlue" Margins="0 25 0 0">
<DirectEvents>
<Click OnEvent="cmdWindowAlternativeCopyMethodContinue2_DirectClick" >
<ExtraParams>
<ext:Parameter Name="DATA_CLIPBOARD" Value="window.clipboardData.getData('Text')" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:Window>
</form>
</body>
</html>
Tks
Last edited by fabricio.murta; Sep 17, 2016 at 12:38 AM.