Hi,
CheckBoxInHeader( http://www.telerik.com/forums/how-can-i-select-multiple-check-boxes-in-radgrid-and-select-all) sample code is not working in Windows 10 operating system , this is working in previous versions.
Please advise.
Thanks.
9 Answers, 1 is accepted
Thank you for writing.
The referred custom implementation is applicable for old versions. GridViewCheckBoxColumn has a built-in functionality for checking all check boxes in it, via checkbox placed in the column header cell. By setting the EnableHeaderCheckBox property to true you will enable the embedded in the header cell RadCheckBoxElement. Additional information is available in the following help article: http://docs.telerik.com/devtools/winforms/gridview/columns/column-types/gridviewcheckboxcolumn
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
Hi Dess ,
Thank you for response. I didn't see EnableHeaderCheckBox property in GridViewCheckBoxColumn class.
I am using 9.0.15.422 version controls ,Wondering ,Is there any solution for this without updating telerik contorls .
Existing Telerik Contorls and Custom Implementation is working in Windows 8.1 ( problem with Windows 10 OS ).
Please advise.
Thanks.
Thank you for writing back.
Controls from the Telerik UI for WinForms are not supposed to behave differently on Windows 10 machine. Note that the referred KB article relates to RadGridView for Winforms, Q2 2013. However, you use an older version. RadGridView was refactored in 2010. Hence, prior versions may not offer a similar experience as the description one in the KB article. The best approach is to upgrade to the latest version and use the introduced built-in functionality. Thus, you can benefit from all the introduced improvements and new features.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Hi Dess,
Thanks for your response. I am getting different error with latest version and we using radgridview in many forms.
System.InvalidCastException: 'Unable to cast object of type 'Telerik.WinControls.UI.PagingPanelElement' to type 'Telerik.WinControls.UI.GridTableElement'.'
Please help me with solution.
Thank you for writing back.
It seems that you have performed some changes at design time by using the Element hierarchy editor. Thus, the changes are stored accessing the relevant child. However, when you change the version and the internal structure is somehow changed (either a known breaking change or some settings that show/hide some elements) this may provoke an error as in your case. That is why it is not recommended to manipulate the element's hierarchy at design time. You can use the public API for this purpose, e.g. set the RadGridView.TableElement.AlternatingRowColor property to the desired color.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Hi Dess,
Thanks for explanation .
On other note : I just wanted to know , how to uncheck/check header check box pragmatically by using HeaderCellToggleStateChanged event.
Please find attached screen shot.
When i check None ( header Checkbox ) , we have to uncheck all Read checkboxes including header checkbox .
I am able to manage rows check boxes.
Please advise.
Thanks.
Thank you for writing back.
Here is a sample code snippet demonstrating how to toggle the header checkbox programmatically:
private
void
radButton1_Click(
object
sender, EventArgs e)
{
GridTableHeaderRowElement headerRowElement =
this
.radGridView1.TableElement.VisualRows[0]
as
GridTableHeaderRowElement;
if
(headerRowElement !=
null
)
{
int
checkBoxColumnIndex = radGridView1.Columns.IndexOf(
"Discontinued"
);
GridCheckBoxHeaderCellElement headerCell = headerRowElement.VisualCells[checkBoxColumnIndex + 1]
as
GridCheckBoxHeaderCellElement;
headerCell.CheckBox.Checked = !headerCell.CheckBox.Checked;
}
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Hi Dess,
Thanks for code snippet , its working perfectly.
On other note : I didn't see Telerik.WinControls.RichTextBox dll in 2017 version and i am using Richtextbox in many places.
Is RichTextBox replaced by Richtexteditor ? .
Please advise.
Thanks.
Thank you for writing.
As of Q3 2014 SP1 RichTextBox is obsolete. It is replaced by RadRichTextEditor which supports all features that are supported by the RadRichTextBox (and much more). Please refer to the following help article demonstrating how to upgrade to RadRichTextEditor: http://docs.telerik.com/devtools/winforms/richtexteditor/upgrading-to-radrichtexteditor
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik