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. Image for the cookie policy date

CurrentCellValueChangedEvent is fired without value change on columns of type GridTemplateColumn

Hello Syncfusion,

I have a grid with a column of type GridTemplateType like this

<TextBlock Text="{Binding Code}" VerticalAlignment="Center" />

<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<TextBox Text="{Binding Code}" TabIndex="0"/>
<syncfusion:ButtonAdv Grid.Column="1"
Command="{Binding Find}"/>

The problem is each time you ends editing of a cell, although no changes are made, the CurrentCellValueChangedEvent is triggered.


Miquel Juan

3 Replies

SS Susmitha Sundar Syncfusion Team September 19, 2019 05:23 PM UTC

Hi Miquel, 
Thank you for using Syncfusion control. 
In GridTemplateColumn, we can load any controls and we can’t find the triggering of the value changing from that controls. So we have raised the CurrentCellvalueChanged event manually from GridTemplateColumn. 
You can  restrict this behaviour by overriding the OnEditingComplete() method in GridCellTemplateRender. Please refer the below code snippet. 
  this.sfdatagrid.CellRenderers.Add("Template",new GridCellTemplateRenderExt()); 
   public class GridCellTemplateRenderExt : GridCellTemplateRenderer 
     protected override void OnEditingComplete(DataColumnBase dataColumn, FrameworkElement currentRendererElement) 
Please revert to us back, if you need further assistance. 
Susmitha S 

MI Miquel September 23, 2019 08:36 AM UTC

Thank you. Works perfectly!!.

FP Farjana Parveen Ayubb Syncfusion Team September 24, 2019 06:05 AM UTC

Hi Miquel, 
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 

Live Chat Icon For mobile
Up arrow icon