This question is locked. New answers and comments are not allowed.
Is there a way to prevent entering edit mode when double clicking? We would like to customize the behavior so that the only way to get into edit mode is using F2 or using our own custom context menu.
Thanks.
6 Answers, 1 is accepted
0
Hello Alan,
Currently the best way to do that is to provide a new cell template and use it to handle all MouseLeftButtonDown events. I have prepared a sample solution that demonstrates this approach.
Best wishes,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently the best way to do that is to provide a new cell template and use it to handle all MouseLeftButtonDown events. I have prepared a sample solution that demonstrates this approach.
Best wishes,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alan
Top achievements
Rank 2
answered on 06 Jul 2009, 01:07 PM
This works well. However, is there no simpler way to accomplish this without overriding the style of the entire cell? If not possible now, perhaps in a future update?
I'm concerned about overriding the entire cell-style as you did in your example. We want to be able to carry forward future styles from telerik without the need to manually edit the xaml. Also, we will want to apply the other styles shown in your examples.
0
Hello Alan,
Unfortunately there is no simple way to prevent editing with the mouse but we have plans to provide means to configure the editing behavior. For the time being I cannot commit to a specific release date but we will try to provide more flexibility as soon as possible.
Regards,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Unfortunately there is no simple way to prevent editing with the mouse but we have plans to provide means to configure the editing behavior. For the time being I cannot commit to a specific release date but we will try to provide more flexibility as soon as possible.
Regards,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alan
Top achievements
Rank 2
answered on 05 Aug 2009, 03:08 PM
Milan,
I've tried modifying your example to set the CellStyle from the code-behind, but I can't get this to work. I've tried
and
But both methods return null.
We can't set the style in the xaml because our grid is binding to dynamic data generated from a database. This is why we need to set this style from code.
Also, I'm using SL3 with the 7/24 internal build. Thanks.
I've tried modifying your example to set the CellStyle from the code-behind, but I can't get this to work. I've tried
column.CellStyle =
this.FindName("CustomCellStyle") as Style;
and
column.CellStyle =
this.Resources["CustomCellStyle"] as Style;
But both methods return null.
We can't set the style in the xaml because our grid is binding to dynamic data generated from a database. This is why we need to set this style from code.
Also, I'm using SL3 with the 7/24 internal build. Thanks.
0
Alan
Top achievements
Rank 2
answered on 05 Aug 2009, 03:35 PM
I just properly converted your example to SL3 and am using the 7/24 internal build. Now, even your original example does not work correctly. It still puts the cell into edit mode when it's double clicked.
0
Hi Alan,
It appears that one of my collegues has provided you with an updated version of the editonf2 project in ticker ID 232705. I hope the solution is working fine.
Best wishes,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
It appears that one of my collegues has provided you with an updated version of the editonf2 project in ticker ID 232705. I hope the solution is working fine.
Best wishes,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.