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.
Unfortunately, activation email could not send to your email. Please try again.

How to set check box on the columns

Thread ID:

Created:

Updated:

Platform:

Replies:

115839 Feb 10,2014 12:57 AM Feb 17,2014 11:12 PM Windows Forms 1
loading
Tags: GridGroupingControl
Kenji Amano
Asked On February 10, 2014 12:57 AM

Hi,

I'd like to know how to set check box on the columns and set edit mode for only the check box colums.

Regards,
Kenji

Attachment: Figure01_f12ab1fc.zip

Vinish Kumar K [Syncfusion]
Replied On February 17, 2014 11:12 PM

Hi Kenji,

Thank you for you interested in Syncfusion products.

Query

Check box in Grid control

We have analysed the reported query in our end. You can set the cellType as checkbox for particular column using the below code.

if(e.ColIndex == 2)

     {

 

           e.Style.CellType = "CheckBox";

                 e.Style.CellAppearance = GridCellAppearance.Raised;

                 e.Style.Enabled = true;

           }

      }

Please refer the below UG links.

http://help.syncfusion.com/ug/windows%20forms/grid/default.htm#!Documents/howtoputacheckboxina.htm

http://help.syncfusion.com/ug/windows%20forms/grid/default.htm#!Documents/checkbox.htm

Readonly for one column 

We have a property “ReadOnly” to set the cells as non-editable. Please refer the below codes.

// Changes cannot be made to the cell (1,1).

this.gridControl1[1,1].ReadOnly = true;

Or use the query cell info event for this.

 private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

    {

           

        if(e.ColIndex > 2)

        {

            e.Style.ReadOnly = true;

        }

    }

Please refer the below UG links.

http://help.syncfusion.com/ug/windows%20forms/grid/default.htm#!Documents/howtomaketheparticul.htm

http://help.syncfusion.com/ug/windows%20forms/grid/default.htm#!Documents/makingachangetoaread.htm

Please let me know if you have any concerns.

Regards,

Vinish K.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;