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

checkbox in header cell of a checkbox column

9 Answers 308 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shashiram
Top achievements
Rank 1
Shashiram asked on 24 Aug 2010, 12:51 PM
Hi,
we have check box in header cell of acheck box column and it is working fine for the version (2009.3.9.1203)
when we upgrade the dlls to new version (2010.2.10.713) its not working.

/// Class to Display check box Header cell
    public class CheckBoxHeaderCell : GridHeaderCellElement
    {
    }
I am getting some problem in the above class.

please give the work around for the new dlls.

Thank you,
Shashi


9 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 26 Aug 2010, 07:29 PM
Hello Shashiram,

Thank you for your question.

The Knowledge base article for the header cell check box is updated and compatible with Q2 2010 SP1 (v2010.2.10.806) version of the RadGridView control. Please review the updated article here.

I hope it helps.

Regards,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Greg
Top achievements
Rank 1
answered on 27 Oct 2010, 09:00 PM
Hi Alexander, I'm trying to figure out how to put a link label into the header of a RadGridView. I'm thinking that the check box in header article is what I need to read but sadly that link you've put in does not go to a valid article. Has the article moved?

Cheers
Greg
0
Emanuel Varga
Top achievements
Rank 1
answered on 27 Oct 2010, 09:53 PM
Hello Greg,

Here is the updated link for the Select all checkbox in header KB Article.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Tim
Top achievements
Rank 1
answered on 05 Dec 2014, 04:37 AM
Hello Alexander,

I can create a GridViewCheckBoxColumn, but I can't find EnableHeaderCheckBox property. Finally, I have to place a checkbox control in the column header cell. What's the problem? I used theTelerik UI for WinForms Q2 2014. 

Thank you in advance.
0
Stefan
Telerik team
answered on 05 Dec 2014, 02:57 PM
Hello Tim,

The check box in the header was introduced in Q2 2014 SP1. Here is the blog announcement: http://blogs.telerik.com/winformsteam/posts/14-09-19/search-for-data-and-batch-change-booleans-in-radgridview-for-winforms-like-never-before.

For previous versions you can use the approach suggested in this KB article: http://www.telerik.com/support/kb/winforms/gridview/details/add-check-all-in-the-header-cell-for-a-gridviewcheckboxcolumn.

I hope this helps.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tim
Top achievements
Rank 1
answered on 04 Jan 2015, 03:37 PM
Hello Stefan,

I have red the blog announcement and do it in many ways, but it still doesn't work. Here is my code in Form_load():

GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn();
checkBoxColumn.DataType = typeof(int);
checkBoxColumn.Name = "checkboxColumn";
checkBoxColumn.FieldName = "checkbox";
checkBoxColumn.HeaderText = "OK?"; 
radGridView1.Columns.Add(checkBoxColumn); 
  
I can't find the "EnableHeaderCheckBox" property, Please do me a favour.

Best Regards,
 
































































































































0
Stefan
Telerik team
answered on 05 Jan 2015, 11:57 AM
Hello Tim,

The only reason why you would not find this property is if you are using a version where this functionality was not introduced. The check box in the header was introduced in Q2 2014 SP1. If you still experience issues, please open a new support ticket and attach your project in it, so we can investigate it.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tim
Top achievements
Rank 1
answered on 12 Jan 2015, 08:14 AM
Hi,

I add a checkbox in the header of GridViewCheckBoxColumn by the EnableHeaderCheckBox property. Next, I want to set the CheckState to true for the header checkbox, My code is as follows,

private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{            
      if (e.CellElement is GridCheckBoxHeaderCellElement)
      {
            for (int i = 0; i < e.CellElement.Children.Count; i++)
            {
                  if (e.CellElement.Children[i] is RadCheckBoxElement)
                  {
                       (e.CellElement.Children[i] as RadCheckBoxElement).Checked = true;
                  }
            }
      }            
}   

But ArgumentOutOfRangeException is happened, so please help me figure out what's the problem.
Another question, how to align the checkbox in the header of GridViewCheckBoxColumn?

Best Regards,

0
Stefan
Telerik team
answered on 12 Jan 2015, 12:17 PM
Hi Tim,

You can use the GridViewCheckBoxColumn's Checked property to check the header check box.

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Shashiram
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Greg
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or