Dear Admin
I just have a RadGridView with two columns, and I have already set these column read-only to be 'True' , users are not allowed to do any change for these two columns' value. But if users would like to copy value in these two columns, how to implement such request? I tried to use Ctrl+C and no effct finally.
9 Answers, 1 is accepted
Can you please clarify a bit what exact behavior are you aiming at? Is it copying data from the column of RadGridView, or copying data into the cells of the read only column?
Best Regards,
Stefan X1
Progress Telerik
Dear Stefan X1
Just request to copy cell value that corresponding column of RadGridView already set to be read-only into other place such as notepad.
Thanks a lot for your response.
Thanks for the clarification.
You should, however, be able to copy the data from a readonly column unimpededly. Attached to my reply you can find a short video i prepared, that demonstrates this. Can you please check it out? Am I missing something?
Regards,
Stefan X1
Progress Telerik
Dear Stefan X1
I just checked attachment video, and fount that once you select one cell and the whole row will be copied into notepad, actually I just would like to copy pointed cell value into notepad. but I think we have already got the row array value from read-only columns, we can control which one of them used by logical judgement, but for end users, they cannot get excepted cell value through copy, this is really not very good. So any other workround or ideas?
You should be able to copy only the value of a given cell by handling the CopyingCellClipboardContent event of RadGridView. This is documented in the Copying help article. May I kindly ask you to give the approach demonstrated in it a try?
I hope it helps.
Regards,
Stefan X1
Progress Telerik
Dear Stefan X1
Thanks a lot for your help.
I used CopyingCellClipboardContent event and found that cannot get current only selected cell.
The CopyingCellClipboardContent event will hit four times after one row with four columns selected and Ctrl+C command carried out.
I tried to use SelectedCellChanged event to get current selected cell, but failed as supported whole row cells information every time.
I tried to use double-click event to get selected cell, result is good,but it is not very good for the end user.
I tried to set column to be editable and would like to make every commiting action to be cancelled, but I cannot implement it.
And I have no idea how to realize such request.
Maybe I need to change another thinking.
In case I am understanding the scenario correctly, you should be able to utilize the SelectedCells property of RadGridView. Can you please check it out?
Regards,
Stefan X1
Progress Telerik
Dear Stefan X1
let me try first. once I have progress, I will update such thread.
Thanks a lot.
Dear Stefan X1
We can close the thread and I'm sorry for my no full understanding about RadGridView. The RadGridView Control contains a property called SelectionUnit, If I set it to be Cell or Fixed, that means that everytime once click and post Ctrl+C command, only selected cell value will be copied. It is really very good.
Thanks a lot.