Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Accessing CheckBox in Header Template
posted

How to access the checkBox placed in Headertemplate ? Pls suggest.

  • 45049
    Suggested Answer
    posted

    First, get a reference to your column, cast to a TemplatedColumn object.  Its HeaderItem property is a control container that will have the instance of whatever controls you had placed in your header template.

    For example, in C#:

    using Infragistics.WebUI.UltraWebGrid;
    ...
    TemplatedColumn tc = ultraWebGrid1.Columns.FromKey("CheckboxCol") as TemplatedColumn;
    CheckBox cb = tc.HeaderItem.FindControl("HeaderCheckBox") as CheckBox; // Pass in the ID of your checkbox here

  • 1147
    posted

     Hi,

    use versions this.

    InfraGrid_Products.Columns.FromKey(

    "Chk").Hidden = true;