[CLOSED] Showing copy / paste information in a gridpanel

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] Showing copy / paste information in a gridpanel

    Is there any way in which i can show information in a grid panel which the user can select with the mouse and copy (ctrl + c), as if it was in a textbox?
    Last edited by Daniil; Nov 10, 2010 at 1:41 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I was able to achieve this using TemplateColumn. Please try the following thing.

    Example
    <ext:TemplateColumn Header="Test" DataIndex="test1>
        <Template>
            <Html>
                <div>{test}</div>
            </Html>
        </Template>
    </ext:TemplateColumn>
  3. #3
    Hi,

    Also please see the following article
    http://www.rahulsingla.com/blog/2010...t-to-clipboard
  4. #4
    In Daniil's suggestion, how could i do if the column is a GroupingSummaryColumn?
  5. #5
    In fact it didn't work... I changed to template column but still can't select the information to copy it.
  6. #6
    Quote Originally Posted by Pablo Azevedo View Post
    In Daniil's suggestion, how could i do if the column is a GroupingSummaryColumn?
    I was able to achieve using <div> again. I wrapped a value in <div>. Please see Renderer and SummaryRenderer.

    It looks like this:

    Example
    <ext:GroupingSummaryColumn 
            ColumnID="Description" 
            Header="Task" 
            Sortable="true" 
            DataIndex="Description" 
            Hideable="false"
            SummaryType="Count">
            <Renderer Handler="return '<div>' + value + '</div>'"/>
            <SummaryRenderer Handler="var v = ((value === 0 || value > 1) ? '(' + value +' Tasks)' : '(1 Task)'); return '<div>' + v + '</div>'" />    
            <Editor>
                <ext:TextField runat="server" AllowBlank="false" />
            </Editor>
        </ext:GroupingSummaryColumn>
    I tested it using the following example
    https://examples1.ext.net/#/GridPane...oupingSummary/
  7. #7
    Quote Originally Posted by Pablo Azevedo View Post
    In fact it didn't work... I changed to template column but still can't select the information to copy it.
    Please provide a sample code to investigate.
  8. #8
    Daniil, have you tried firefox? In IE8 it worked, you have to double click the text to select it, or drag the mouse from right to left, then copy.
  9. #9
    Hi,

    GridPanel makes all cells as unselectable (set unselectable="on" attribute for the cell's div)
    Therefore I can reccomnd to investigate my previos link, add context menu for the cells and copy cell's content to the clipboard via context menu
    http://www.rahulsingla.com/blog/2010...t-to-clipboard
  10. #10
    Vladimir, is there any way to override this behaviour of putting unselectable="on" for divs?
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: Jul 09, 2012, 11:24 AM
  2. copy paste from ms word
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Aug 20, 2010, 7:30 AM
  3. [CLOSED] Copy / Paste Like with GridPanel but not using Clipboard
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 12, 2009, 8:12 AM

Tags for this Thread

Posting Permissions