This question is locked. New answers and comments are not allowed.
I have a custom column defined as below,
I have also defined custom actions when the checkbox is checked, unchecked. However I need to prevent the underlying cell (the area around the checkbox) from being able to be clicked as it is causing issues with my application. I only want the user to be able to modify the state of the checkbox and not be able to click the cell around it. Is this possible.
Please help.
Thanks,
Tim
Imports System Imports System.Net Imports System.Windows Imports System.Windows.Controls Imports System.Windows.Documents Imports System.Windows.Ink Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Media.Animation Imports System.Windows.Shapes Imports Telerik.Windows.Controls Imports Telerik.Windows.Controls.GridView Imports System.Windows.Controls.Primitives Public Class CustomColumn Inherits GridViewDataColumn Public Overrides Function CreateCellElement(ByVal cell As GridViewCell, ByVal dataItem As Object) As FrameworkElement Dim cb = TryCast(cell.Content, CheckBox) If cell.Value IsNot Nothing Then If cb Is Nothing Then cb = New CheckBox() cb.Height = 20 cb.SetBinding(CheckBox.IsCheckedProperty, Me.DataMemberBinding) cell.Content = cb cell.SetBinding(GridViewCell.ValueProperty, Me.DataMemberBinding) End If Else End If If cell.Value = "True" Then cell.Background = New SolidColorBrush(Colors.Green) ElseIf cell.Value Is Nothing Then cell.Background = New SolidColorBrush(Colors.LightGray) 'cell.IsEnabled = False End If Return cb End FunctionEnd ClassI have also defined custom actions when the checkbox is checked, unchecked. However I need to prevent the underlying cell (the area around the checkbox) from being able to be clicked as it is causing issues with my application. I only want the user to be able to modify the state of the checkbox and not be able to click the cell around it. Is this possible.
Please help.
Thanks,
Tim