Hi,
I have a xamgrid with cell value presenter as posted below.
I tried to use the inbuilt Copy functionality but it seems to copy the Content of the cell rather than the displayed value and it also doesn't allow selecting a part of the text and copying it to the clipboard. I achieved this for a selected cell by binding the CTRL+C gesture.
Since the above solution is not providing me the functionality i want, I changed the CellValue presenter to display the content using a textbox (styled liked a textblock) so that users can copy all or part of the presented data from the cell.
Now i can selectively copy text from the cell, but if i click on the textbox area of the cell, the click is not registered with the grid. Now i have to be careful as to where i am clicking to get the intended behavior like highlighting the record or firing an event to fetch child records as a result of the click.
How can I implement a solution where
My Current Cell Value Presenter style below. This cell value presenter is attached to a unbound field which is generated dynamically and added to the field layout. Any help is greatly appreciated.
<Style x:Key="DynamicBackgroundCellStyle" TargetType="{x:Type igDP:CellValuePresenter}">
<ContentPresenter.ContentTemplate>
<DataTemplate>
<TextBox IsReadOnly="True" Background="Transparent" Foreground="{DynamicResource Foreground}"
BorderThickness="0" Text="{Binding Mode=OneWay}" />
</DataTemplate>
</ContentPresenter.ContentTemplate>
Thanks
Shahin
Hi Infragistics Support
Any updates on this? Any help is greatly appreciated
Hello Shahin,
Thank you for your post!
I have been looking into you issue. I have created a small sample application in order to test the reported issue. In the sample application I have added the style, that you have provided. It seems that you are using some converters, that are not in the post.
I am attaching the above mentioned sample application. Would you please modify the sample with the converters, so I would be able to further investigate this issue for you and provide you with further information on this matter.
Thank you for the cooperation. Looking forward to hearing from you.
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.