This is a migrated thread and some comments may be shown as answers.

RadGridview paste adds blank rows

2 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
herb
Top achievements
Rank 1
Veteran
Iron
herb asked on 28 Dec 2019, 08:20 PM

Have a RadGridview that allows multiple selections. Currently only allowing rows.

<telerik:RadGridView x:Name="gvMrsUserSettings"
                                 Background="Black"
                                 FontFamily="Arial"
                                 Foreground="White"
                                 FontSize="11"
                                 GroupRenderMode="Flat"
                                 ItemsSource="{Binding MrsUserDataTable}"
                                 SelectionMode="Extended"
                                 AutoGenerateColumns="True"
                                 Margin="0,0,0,0"
                                 Grid.Row="1"
                                 ActionOnLostFocus="None"
                                 CanUserFreezeColumns="False"
                                 RowIndicatorVisibility="Collapsed"
                                 ShowGroupPanel="False"
                                 IsFilteringAllowed="True"
                                 ShowSearchPanel="True"
                                 SearchPanelCloseButtonVisibility="Collapsed"
                                 IsReadOnly="True"
                                 CanUserReorderColumns="False"
                                 CanUserDeleteRows="False"
                                 CanUserInsertRows="False"
                                 CanUserGroupColumns="False"
                                 CanUserSearch="False"
                                 CanUserSortGroups="False"
                                 EnableColumnGroupsVirtualization="False"
                                 ClipboardCopyMode="All,Header"
                                 ClipboardPasteMode="Cells,AllSelectedRows"
                                 IsBusy="False"
                                 >

If you select row 1, 4, 6 - 10 and 20, do a Ctrl+C then a Ctrl+V in a text file or excel all the rows between the numbers are blank.

Not sure what feature needs to be included in the XAML to prevent this behavior. Or what must be done short of modifying the collection in the clipboard.

sample of result is:

GROUP
UTI-KELLER
 
 
CLK_FINANCE
 
EMS_FIRE
CEL
COURT_ADMIN
COURT_ADMIN
COURT_ADMIN
 
 
 
 
 
 
 
 
 
UTILITIES

 

 

2 Answers, 1 is accepted

Sort by
0
Rand
Top achievements
Rank 1
Iron
answered on 21 Aug 2021, 11:09 AM
So, no answer to this behaviour?
0
Accepted
herb
Top achievements
Rank 1
Veteran
Iron
answered on 21 Aug 2021, 02:08 PM

This was answered on another ticket.

"

The RadGridView control exposes a ClipboardCopyMode property which is a flags enumeration that can hold the value SkipEmptyRows. When this mode is set, the control will not copy rows with values that are all null or empty.
ClipboardCopyMode="Cells,SkipEmptyRows"
Can you please try setting this property and let me know if it provides the desired result? I will be awaiting your reply.

"

Tags
GridView
Asked by
herb
Top achievements
Rank 1
Veteran
Iron
Answers by
Rand
Top achievements
Rank 1
Iron
herb
Top achievements
Rank 1
Veteran
Iron
Share this question
or