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

[Solved] Customizing rows copying in gridview

5 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
luke
Top achievements
Rank 1
luke asked on 04 Nov 2010, 12:57 PM
Hi,

How can i customize the way which rows are copied? In my grid i have datasource which contains special markers/values used in converter for example "-99999" mean something diffrent after applying converter at that value, but ctrl+c still copy value before it was converted.

Another question about copying in radgridview is... How can i disable copying  specific column?

thanks for any ideas

5 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 04 Nov 2010, 01:40 PM
Hi Łukasz Hutyra,

 Could you please open a support ticket and attach a sample application that reproduces the converted value not being copied problem?

 You can disable copying of a specific column by handling the CopyingCellClipboardContent event and cancelling it for the specific column.

Best wishes,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
luke
Top achievements
Rank 1
answered on 08 Nov 2010, 11:20 AM
First problem i solved,

but i can't block some column to be copied( not the way i wanted)

void

 

 

adminGrid_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e)

 

{

 

 

if (e.Cell.Column.Header.ToString() == "Edits")

 

{

e.Handled =

 

true;

 

e.Cancel =

 

true;

 

}

}

ok, content is not copied now, but the header yes,  i would like hide the header as well at copied text.

thanks

0
Yavor Georgiev
Telerik team
answered on 08 Nov 2010, 11:27 AM
Hi Łukasz Hutyra,

 Could you please try using our latest internal build?

Kind regards,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
luke
Top achievements
Rank 1
answered on 08 Nov 2010, 12:14 PM
Unfortunetly, header is still being copied.

It wouldnt be so big problem, but its causing that the contents of column moves left because of lack value on this "Edits" column and finally copied column header not match to value. I could solve this problem by providing default value on this column for example to space " ". But this column is initally hidden, and this value won't be bind to column.
0
Yavor Georgiev
Telerik team
answered on 08 Nov 2010, 02:17 PM
Hi Łukasz Hutyra,

 You are correct, we have managed to reproduce the issue even with our internal builds. You will be able to find the fix in our Q3 release, which is due this week.

All the best,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
luke
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
luke
Top achievements
Rank 1
Share this question
or