Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How can we drag select and copy paste listgrid rows with the background color

    Be sure your post includes:

    1. Smart GWT version -> SC_SNAPSHOT-2011-12-05/Pro Deployment (built 2011-12-05)

    2. IE, Chrome and FF

    We tried setting the property "setCanDragSelectText" to true on the list grid. It copies the grid text, however, it doesn't copy the background color. How can we enable that?

    #2
    What the browser chooses to grab as part of a native copy operation is not actually something we can control.

    If you do something like an export to Excel, we have better control - in that situation we will apply backgroundColor that comes from ListGrid hilites.

    Comment


      #3
      How can we drag select and copy paste listgrid rows with the header

      Hi,
      We have enabled the drag select text on the list grid. However, when we try to drag select the gird headers and copy paste them, they are all stacked vertically. Please see the attached images which show the problem. Also, it is very tedious to drag select the grid headers. Can you please let us know how can we achieve this?


      Thanks!
      Attached Files

      Comment


        #4
        Again, we have almost no influence on the native drag select behavior, which is indeed wildly inconsistent when used with complex content.

        If you want a consistent copy and paste experience, we would recommend using these features or, for something custom, using the same approach (a menu item that opens up a text area that users can copy from).

        Comment


          #5
          Hi,
          We checked the copy and paste feature that you suggested.
          However, it doesn't preserve the grid table format and also it doesn't copy the headers. Our customer's requirement are to copy the headers and also preserve it in a grid/tabular format so that it can be sent via e-mail etc. Can you please provide a solution for this?
          Also, our customers don't want to do a multi-step process of pasting in excel first (as suggested in the feature) and then copying and pasting it further. So that is not an option for us.

          Thanks!
          Last edited by pdagaonk; 16 Aug 2013, 13:39.

          Comment


            #6
            No, we can't solve the issue with native drag selection picking up random subsets of information determined by the browser. You're asking us to add features to the browser, but we don't make a browser, we make SmartGWT.

            Again, if you want a particular subset of the grid, you can come up with some UI you want for selecting that subset of the grid, and implement that. A grid can provide HTML suitable for printing which may be close to what you want, if not, you'll need to generate your own HTML.

            From there, we provide features to export to PDF, or to send to the server, where the HTML could be embedded in a server-generated email.

            If you're hoping for direct copy and paste to work, you might try sticking the HTML you want into a RichTextCanvas and encouraging the user to copy/paste from there. That might work, but again if it doesn't, it's not a behavior we can influence.

            Comment

            Working...
            X