This is a migrated thread and some comments may be shown as answers.

GridViewCheckBoxColumn CheckBox Size

3 Answers 867 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nadia Sangiovanni
Top achievements
Rank 1
Nadia Sangiovanni asked on 23 Nov 2012, 08:48 PM
Hi Support,

We are presently designing a touchScreen application. The size of the check box in a GridViewCheckBoxColumn is too small.
How can I change the size of the check box in a GridViewCheckBoxColumn?

Regards,
Nadia

3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 28 Nov 2012, 02:27 PM
Hello Nadia,

Thank you for writing.

The easiest way to increase the size of the check box is to assign an image to the CheckMark. Attached you can find a sample project demonstrating this.

Alternatively, you can increase the size of the default check mark:
void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    GridCheckBoxCellElement checkCell = e.CellElement as GridCheckBoxCellElement;
 
    if (checkCell != null)
    {
        RadCheckBoxEditorElement el = checkCell.Children[0] as RadCheckBoxEditorElement;
        el.Checkmark.CheckElement.UseFixedCheckSize = false;
        el.Checkmark.CheckElement.MinSize= new Size(32, 32);
    }
}

I hope this helps.
 
Kind regards,
Stefan
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Nadia Sangiovanni
Top achievements
Rank 1
answered on 28 Nov 2012, 04:36 PM
Hello Stefan,

Thank you for your response. I use the suggested code and everything as expected. I had to remove the line with the UseFixedCheckSize because this function don't seem to exist for GridCheckBoxCellElement.

Also, I didn't find the sample project demonstrating how to assign an image to the CheckMark.I guess you forget to attach the file.

Best Regards,
Nadia

 
0
Stefan
Telerik team
answered on 03 Dec 2012, 12:57 PM
Hi Nadia,

Thank you for your reply.

Indeed, I did not attach the sample. Please excuse me for the omission. You can find the sample attached to this post.

As to the missing property, it exists in the latest version (Q3 2012), so I assume that you are using a previous one and this is why it does not exist.

I hope this helps.
 
All the best,
Stefan
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
Nadia Sangiovanni
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Nadia Sangiovanni
Top achievements
Rank 1
Share this question
or