We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting cell comments on GridDataControl does not seem to work

Thread ID:





117821 Dec 22,2014 02:51 PM UTC Dec 26,2014 04:23 AM UTC WPF 3
Tags: GridDataControl
Sean A
Asked On December 22, 2014 02:51 PM UTC


I want to set cell comments on a grid control.  As a test, I set the Comment property on the GridDataColumnStyle as follows:

 <syncfusion:GridDataVisibleColumn MappingName="Address" Width="100">
                        <syncfusion:GridDataColumnStyle Comment="TEST!">                          

And when I run the application, I see the red triangle indicator on each cell indicating that there is a cell comment, however when I hover over the cell nothing happens.

How do I properly set the comment on a grid cell and get it to display correctly? I have attached example project where the Comment property is set but at runtime I am not able to see the comments.

Any help would be appreciated. 


Attachment: WpfTest_d4d4ee54.zip

Mahendran Annamalai [Syncfusion]
Replied On December 23, 2014 06:57 AM UTC

Hi Sean,


Thank you for contacting syncfusion support.


We have analyzed your query. You can use Comments in GridDataControl by setting ShowComment property as true in GridCommentServices. Please refer the below code snippet.


Code Snippet:





            ItemsSource="{Binding Data}"




Please find modified sample from below location.






Attachment: WpfTest_a7a9d2ca.zip

Sean A
Replied On December 23, 2014 03:20 PM UTC

Hi Mahendran,
Thanks. This indeed does get the Comment property to show on the grid.
However, my next logical step would be to bind this property to my view model, but it appears the Comment property cannot be bound to.
I get the following error when I try something like this - Comment="{Binding ZipCode}:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: A 'Binding' cannot be set on the 'Comment' property of type 'GridDataColumnStyle'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
How can I use this Comment property to bind or set to values for each item in my grid?

Mahendran Annamalai [Syncfusion]
Replied On December 26, 2014 04:23 AM UTC

Hi Sean,


Thank you for your update.


We have analyzed your query, you can display every cell value as comment by using CommentTemplateKey  for that particular column. By customizing DataTemplate you can achieve your requirement. Please refer the below codesnippet.


Code snippet:


        <DataTemplate x:Key="commenttext" >

            <StackPanel Background="Red">

                <TextBlock x:Name="txtblck" Text="{Binding Path=CellValue}"/>




<syncfusion:GridDataControl Name="syncgrid">

<syncfusion:GridDataVisibleColumn MappingName="CustomerName"  >


                        <syncfusion:GridDataColumnStyle CommentTemplateKey="commenttext"               Comment="test" >






Please let us know if you have any queries.




Attachment: GDC_CommentSample_d25313d2.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon