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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Checkbox in Header - GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

90468 Oct 2,2009 12:50 PM UTC Oct 6,2009 01:10 PM UTC WinForms 3
loading
Tags: GridControl
Gurbhej Dhillon
Asked On October 2, 2009 12:50 PM UTC

Hi,

I was able to put a checkbox control in the column header using the following example - http://help.syncfusion.com/ug_73/gridwin/HowToPutACheckBoxInAHeaderCellInAGridControlOrGridDataBoundGrid.html

But how do I preserve the style of the header columns - backcolor, border, etc. so it looks similar to the other header cells?

Thanks,

Gurbhej

Lingaraj S [Syncfusion]
Replied On October 5, 2009 01:56 PM UTC

Hi Gurphej,

Thank you for your interest in Syncfusion products.

If you want to get a Header style in GridDataBoundGrid, then please try using below way to achieve your requirement.

Refer the code below:

int colIndex1 = this.gridDataBoundGrid1.Binder.NameToColIndex("Column2");
Color color=this.gridDataBoundGrid1[0,colIndex1].BackColor;
GridBorder border = this.gridDataBoundGrid1[0,colIndex1].Borders.All;


Please let me know if you have any queries.

Regards,
Lingaraj S.

Gurbhej Dhillon
Replied On October 5, 2009 04:26 PM UTC

This doesnt seem to resolve the issue I am having. Please see attached screenshot. I want to have the header cell with the checkbox to look exactly like the header with the text in it.



headerCell_34b95d33.zip

Lingaraj S [Syncfusion]
Replied On October 6, 2009 01:10 PM UTC

Hi Gurbhej,

Thank you for the update.

If you want create CheckBox in column header with GridVisualStyle, it can be done by handling CustomHeaderCell in GridDataBoundGrid as shown in attached sample.

Refer the sample from below link:
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/Forums/HeaderCheckBox.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

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.

Warning Icon 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.Close Icon

;