Paste data from Excel

3 posts, 0 answers
  1. Matthew
    Matthew avatar
    46 posts
    Member since:
    Aug 2011

    Posted 15 Oct 2011 Link to this post

    I am having all sorts of trouble getting this to work...

    My RadGridView is setup as follows:

    <telerik:RadGridView HorizontalAlignment="Left" Margin="10" Name="rgvBulkEntry" VerticalAlignment="Top" Grid.Column="1" Width="1010" Height="286" MaxColumnWidth="200" MinColumnWidth="75" CanUserFreezeColumns="False" CanUserReorderColumns="False" SelectionMode="Extended" SelectionUnit="Cell" ClipboardPasteMode="AllSelectedCells" >
                <telerik:RadGridView.Columns>
                    <telerik:GridViewSelectColumn Header="Select" />
                    <telerik:GridViewColumn Header="Col1" />
                    <telerik:GridViewColumn Header="Col2" />
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>

    From what I was reading, with these few property settings, when data is copied into the clipboard from Excel - it should paste in to the RadGridView without any problems.

    But I am not seeing anything show up in the grid.

    What am I missing???
  2. Matthew
    Matthew avatar
    46 posts
    Member since:
    Aug 2011

    Posted 16 Oct 2011 Link to this post

    I got this issue figured out...syntax issue.
  3. Frank
    Frank avatar
    18 posts
    Member since:
    Oct 2011

    Posted 18 Oct 2011 Link to this post

    Can you let me know what you did? 

    I am having the same issue, when I copy and paste from excel 2007, the radgrid would create the cells (i.e. 3 colum by 4 rows) but the cells are empy, nothing are being copied over.

    Are there codes in the code behind in the paste or pasting event that I need to do extra coding to get this working?

    Here is my xaml:

     

    <Grid x:Name="LayoutRoot">

        <telerik:RadGridView HorizontalAlignment="Left"Name="RadGridView1" VerticalAlignment="Top" Height="440" Width="640" SelectionMode="Extended" SelectionUnit="Cell" ClipboardCopyMode="All" ClipboardPasteMode="Cells,AllSelectedCells">

            <telerik:RadGridView.Columns>

                <telerik:GridViewColumn Header="Account" />

                <telerik:GridViewColumn Header="Phone" />

                <telerik:GridViewColumn Header="Address" />

            </telerik:RadGridView.Columns>

        </telerik:RadGridView>

    </Grid>

     

Back to Top