Hi All,
I'm using rad grid view having one column.
I've binded using DataTemplate like this,
<
telerikGridView:RadGridView
Name="radGridView"
AutoGenerateColumns="False"
ItemsSource="{Binding RowValues, Mode=TwoWay}">
<telerikGridView:RadGridView.Columns>
<!--<telerikGridView:GridViewDataColumn Header="Column # 1" DataMemberBinding ="{Binding ColumnOneValue, Mode=TwoWay}"/>-->
<telerikGridView:GridViewDataColumn Header="Column # 1" DataMemberBinding ="{Binding ColumnOneValue}">
<telerikGridView:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding ColumnOneValue}"></TextBlock>
</Grid>
</DataTemplate>
</telerikGridView:GridViewDataColumn.CellTemplate>
<telerikGridView:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<Grid>
<TextBox Text="{Binding ColumnOneValue, Mode=TwoWay}"></TextBox>
</Grid>
</DataTemplate>
</telerikGridView:GridViewDataColumn.CellEditTemplate>
</telerikGridView:GridViewDataColumn>
</telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>
I change the value in the first cell of first row and then click the first cell in the second row.
At that time the binded set property is called twice.
I want that property should be called only once, since I'm doing validation and showing error message.
Following is the stack trace when the set property is called for the first time,
Grid!Grid.RowValue.ColumnOneValue.set(string value) Line 51
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.dll!System.Windows.CLRPropertyListener.Value.set(object value) + 0x23 bytes
System.Windows.dll!System.Windows.PropertyAccessPathStep.Value.set(object value) + 0x10 bytes
System.Windows.dll!System.Windows.Data.BindingExpression.UpdateValue() + 0x3b2 bytes
System.Windows.dll!System.Windows.Data.BindingExpression.TargetLostFocus(object sender, System.Windows.RoutedEventArgs e) + 0xb bytes
System.Windows.dll!MS.Internal.CoreInvokeHandler.InvokeEventHandler(int typeIndex, System.Delegate handlerDelegate, object sender, object args) + 0x7bc bytes
System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, int actualArgsTypeIndex, string eventName) + 0x338 bytes
[Appdomain Transition]
Following is the stack trace when the set property is called for the second time,
Grid!Grid.RowValue.ColumnOneValue.set(string value) Line 51
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.dll!System.Windows.CLRPropertyListener.Value.set(object value) + 0x23 bytes
System.Windows.dll!System.Windows.PropertyAccessPathStep.Value.set(object value) + 0x10 bytes
System.Windows.dll!System.Windows.Data.BindingExpression.UpdateValue() + 0x3b2 bytes
System.Windows.dll!System.Windows.Data.BindingExpression.UpdateSource() + 0x28 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateBindingBaseSource(System.Windows.Data.BindingExpression bindingBase, System.Windows.DependencyObject source) + 0x75 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateSourceWithEditorValue(Telerik.Windows.Controls.GridView.GridViewCell gridViewCell) + 0x21c bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewCell.UpdateSourceWithEditorValue() + 0x43 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.ValidateCell(Telerik.Windows.Controls.GridView.GridViewCell cell) + 0x12b bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.PerformCellValidation(Telerik.Windows.Controls.GridView.GridViewCell cell) + 0x4d bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.CommitCellEdit(Telerik.Windows.Controls.GridView.GridViewCell currentCell, bool isLeavingRow) + 0xa3 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.OnCurrentCellInfoChanging(Telerik.Windows.Controls.GridViewCellInfo oldCell, Telerik.Windows.Controls.GridViewCellInfo newCell) + 0xa1 bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.CurrentCellInfo.set(Telerik.Windows.Controls.GridViewCellInfo value) + 0x7d bytes
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewCell.OnGotFocus(System.Windows.RoutedEventArgs e) + 0xc9 bytes
System.Windows.dll!System.Windows.Controls.Control.OnGotFocus(System.Windows.Controls.Control ctrl, System.EventArgs e) + 0x31 bytes
System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, int actualArgsTypeIndex, string eventName) + 0x234 bytes
[Appdomain Transition]
Please let me know where I'm doing wrong ? Thank you !
Thanks & Regards,
Kannan