This question is locked. New answers and comments are not allowed.
Hello,
I have attached a behavior on Datagrid; it has ‘CellEditingEnded’ event. It works fine when I place the Combobox, Textbox, and Autocompletebox inside the Datatemplate.
Problem:
The ‘CellEditingEnded’ event will not fire, when I place the Checkbox control inside Datatemplate.
My Code Snippet:
public
class
UpdateValueBehavior : Behavior<RadGridView>
{
protected
override
void
OnAttached()
{
base
.OnAttached();
this
.AssociatedObject.CellEditEnded +=
new
EventHandler<
GridViewCellEditEndedEventArgs>(AssociatedObject_CellEditEnded);
}
void
AssociatedObject_CellEditEnded(
object
sender, GridViewCellEditEndedEventArgs e)
{
// my logic
}
}
Regards,
Gautham
7 Answers, 1 is accepted
0
Hi,
Vlad
the Telerik team
Can you post more info about your grid version?
Regards,Vlad
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
gautham
Top achievements
Rank 1
answered on 16 Nov 2010, 08:13 AM
Hello Vlad,
My gridVersion:
Assembly Telerik.Windows.Controls.GridView.dll, v2.0.50727
Regards,
Gautham
0
Hello,
Vlad
the Telerik team
This is the framework version - not the grid version.
All the best,Vlad
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
gautham
Top achievements
Rank 1
answered on 16 Nov 2010, 08:44 AM
Hello,
> DataGrid Version: 2010.2 812
My code snippet:
Problem: It will work fine when the 'checkbox' is in edit mode,
but when I just click using mouse button. This event will not fire.
Regards,
Gautham
> DataGrid Version: 2010.2 812
My code snippet:
<syncControls:GridViewDataColumn.CellTemplate>
<DataTemplate>
<syncControls:CheckBox IsChecked=
"{Binding IsAllowToDispatch, Mode=TwoWay}"
/>
</DataTemplate>
</syncControls:GridViewDataColumn.CellTemplate>
<syncControls:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<syncControls:CheckBox IsChecked=
"{Binding IsAllowToDispatch, Mode=TwoWay}"
/>
</DataTemplate>
</syncControls:GridViewDataColumn.CellEditTemplate>
Problem: It will work fine when the 'checkbox' is in edit mode,
but when I just click using mouse button. This event will not fire.
Regards,
Gautham
0
Hello gautham,
If you place a CheckBox in the CellTemplate of a GridViewColumn, you will be able to manipulate the CheckBox directly, without entering edit mode in RadGridView. Without entering edit mode, the CellEditEnded event will not fire. I propose to set the IsReadOnly property of the CheckBox in the CellTemplate to true, so that clicking it will enter edit mode and display the CheckBox in the CellEditTemplate. This way, when the CheckBox is manipulated, the CellEditEnded event will fire.
Regards,
Yavor Georgiev
the Telerik team
If you place a CheckBox in the CellTemplate of a GridViewColumn, you will be able to manipulate the CheckBox directly, without entering edit mode in RadGridView. Without entering edit mode, the CellEditEnded event will not fire. I propose to set the IsReadOnly property of the CheckBox in the CellTemplate to true, so that clicking it will enter edit mode and display the CheckBox in the CellEditTemplate. This way, when the CheckBox is manipulated, the CellEditEnded event will fire.
Regards,
Yavor Georgiev
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
gautham
Top achievements
Rank 1
answered on 19 Nov 2010, 07:47 AM
Hello,
But, we don't have a ReadOnly Property for checkbox, so I made used of 'ISEnabled' property. Please help to customize the checkbox by implementing an another property 'ReadOnly'
Anyway this is very useful solution.
Regards,
Gautham
But, we don't have a ReadOnly Property for checkbox, so I made used of 'ISEnabled' property. Please help to customize the checkbox by implementing an another property 'ReadOnly'
Anyway this is very useful solution.
Regards,
Gautham
0
Anand
Top achievements
Rank 1
answered on 22 Aug 2012, 03:38 PM
Yavor ,Could not able to implement your solution. Can you post code ?
Anand
Anand