This question is locked. New answers and comments are not allowed.
Hi
We're facing an issue while copying content from RadGridView to Excel.
Our RadGridView has a GridViewSelectColumn as first column, which must be ignored while copying.
When we select rows and copy the content, we are getting the first column header as 'System.Windows.Controls.CheckBox Content: IsChecked:False'
To eleminate this, we've placed the below work-arround for supressing the column from being copied:
Using the above logic, we're able to clear the content from being copied but, we're getting the cell in the copied content.
That is, when pasted in excel, the first column being pasted with empty header and empty cell contents.
Please help us to eleminate the complete column from getting copied.
There is a similar issue with ignoring columns while pasting back from Excel to RadGridView
Regards
Vasista
We're facing an issue while copying content from RadGridView to Excel.
Our RadGridView has a GridViewSelectColumn as first column, which must be ignored while copying.
When we select rows and copy the content, we are getting the first column header as 'System.Windows.Controls.CheckBox Content: IsChecked:False'
To eleminate this, we've placed the below work-arround for supressing the column from being copied:
Dim
checkBoxColumn =
CType
(sender, RadGridView).Columns(
"CheckBoxColumn"
)
If
checkBoxColumn IsNot
Nothing
AndAlso
originalText.Contains(checkBoxColumn.Header.ToString)
Then
updatedText = originalText.Replace(checkBoxColumn.Header.ToString,
String
.Empty)
Telerik.Windows.Controls.Clipboard.SetText(updatedText)
Else
Telerik.Windows.Controls.Clipboard.SetText(originalText)
End
If
Using the above logic, we're able to clear the content from being copied but, we're getting the cell in the copied content.
That is, when pasted in excel, the first column being pasted with empty header and empty cell contents.
Please help us to eleminate the complete column from getting copied.
There is a similar issue with ignoring columns while pasting back from Excel to RadGridView
Regards
Vasista