We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridControl Checkbox size

Hello,
I need to increase all checkbox size inside a GridControl cell and found a thread with some help.
After apply the code to one checkbox cell it changes all checkboxs in grid but the code seems "wrong".
Is it possible to apply the change to the GridControl in general?

My code is:
GridCheckBoxCellRenderer renderer = gridControl.GetCellRenderer(row, col) as GridCheckBoxCellRenderer;
renderer.CheckBoxSize = new Size(20, 20);

Thanks

3 Replies

JP Jagadeesan Pichaimuthu Syncfusion Team July 6, 2019 12:33 PM UTC

Hi Dinis, 
 
Thanks for your update. 
 
We have checked your reported query in our end and we used the common renderer for all the cells which has the CheckBox cell type. So when changing the size of check box at CheckBoxCellRenderer, it will be reflect in all cells in GridControl. Please refer the below code snippet, where you can get the GridCheckBoxCellRenderer from the CellRenderers collection in GridControl. 
 
GridCheckBoxCellRenderer renderer = this.gridControl1.CellRenderers["CheckBox"] as GridCheckBoxCellRenderer; 
renderer.CheckBoxSize = new Size(20, 20); 
 
 
Also you can refer the below forum link for your reference. 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan


DF Dinis Ferreira July 10, 2019 07:26 AM UTC

Hi,
It works very good.
Thanks


JP Jagadeesan Pichaimuthu Syncfusion Team July 10, 2019 07:30 AM UTC

Hi Dinis, 
 
Thanks for your update. 
 
We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Jagadeesan 


Loader.
Live Chat Icon For mobile
Up arrow icon