How to enlarge checkbox in checkbox column?

Hello, is there possible to make checkbox bigger in checkbox type column? I need to make it twice bigger.


3 Replies

VS Vijayarasan Sivanandham Syncfusion Team August 30, 2021 02:48 PM UTC

Hi Warden,

Thank you for contacting Syncfusion Support.

Your requirement can be achieved by set the style into GridCheckBoxColumn.CellStyle in SfDataGrid. Please refer the below code snippet, 
<syncfusion:GridCheckBoxColumn MappingName="IsShipped" HeaderText="Is Shipped" > 
                    <syncfusion:GridCheckBoxColumn.CellStyle> 
                        <Style TargetType="syncfusion:GridCell" > 
                            <Style.Resources> 
                                <Style TargetType="CheckBox"> 
                                    <Setter Property="RenderTransform"> 
                                        <Setter.Value> 
                                            <ScaleTransform ScaleX="2" ScaleY="2"/> 
                                        </Setter.Value> 
                                    </Setter> 
                                </Style> 
                            </Style.Resources> 
                        </Style> 
                    </syncfusion:GridCheckBoxColumn.CellStyle> 
</syncfusion:GridCheckBoxColumn> 
Please refer the below Stack overflow link for more details,

Stack Overflow Link:
https://stackoverflow.com/questions/6256093/change-checkbox-size-wpf 
Please let us know if you have any concerns in this.

Regards,
Vijayarasan S 



VS Vijayarasan Sivanandham Syncfusion Team August 31, 2021 07:04 AM UTC

Hi Warden,

Thanks for the Update.

The reported issue that the GridCell target type mismatch is occurred due to ambiguous type reference between Syncfusion.UI.Xaml.Grid.GridCell and Syncfusion.Grid.GridCell. This can be avoided by specifying the namespace for GridCell in different assemblies. We already provided a knowledge base document to resolve this issue at our end and please make use of the below KB link.

KB Link: https://www.syncfusion.com/kb/5710/how-to-resolve-ambiguous-type-reference-exception 
 
Please let us know if you have any concerns in this. 

Regards, 
Vijayarasan S 



JA James replied to Vijayarasan Sivanandham August 31, 2021 10:41 AM UTC

Thank you for the answer but i'm getting an exception:


System.InvalidOperationException: 'TargetType "GridCell" does not match type of element "GridCell"


EDIT:​

I'm creating a WPF application with NET5 framework and that problem occurs in this version of framework. It works properly with NetFrameword 4.6 as you provided with sample.

I need a solution for NET5.


Second problem is positioning checkbox within a cell. The checkbox is not centered in the cell.


Loader.
Up arrow icon