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
140
Paste Excel data to xamDataTree from clipboard
posted

Hello,

Is there any way to paste Excel data to xamDataTree from clipboard?

In my case I must paste some hierarchical data like this:

Group 1    
  Subgroup 1  
    Item  1
    Item 2
     
     
  Subgroup 2  
    Item 1
    Item 2
    Item 3

So, it would be great if there is some method like in xamGrid (XamGrid.PasteFromClipboard()) that will parse Clipboard data and get it to me by some event.

May be there is some other useful approach?

Best Regards,

Vladimir

Parents
No Data
Reply
  • 140
    posted

    I've solve my problem by using xamGrid as represented bellow.

            
            private void PasteFromExcel()
            {
                var grid = new XamGrid();
                grid.ClipboardPasting += ClipboardPasting;
                grid.PasteFromClipboard();
                grid.ClipboardPasting -= ClipboardPasting;
            }
    
            private void ClipboardPasting(object sender, ClipboardPastingEventArgs e)
            {
                // e.Values has a List<List<string>> type.
                // you can do what you need with it
            }
    
Children
No Data