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
130
How get value of checkbox from Edit Template
posted

Hi,

I've made adding records by this solution: http://www.infragistics.com/community/forums/t/69109.aspx

In my Edit Template I have checkbox: <asp:CheckBox ID="control_IsMain"  runat="server" ></asp:CheckBox>

How can I get value of this checkbox in _RowAdding event (in behinde code)? Because now I'm getting just "False" - even if I marked checbox.

Parents
  • 9190
    Offline posted

    Hi T T,

    Thank you for posting on our forums.

    You should be able to get the checkbox check state using the following logic in the RowAdding or RowAdded events:

    CheckBox checkbox = this.WebDataGrid1.Behaviors.EditingCore.Behaviors.RowEditTemplate.TemplateContainer.FindControl("CheckBox1") as CheckBox;
    bool value = checkbox.Checked;
    Debug.WriteLine(value);

    Please let me know if you have any questions regarding this matter.

Reply Children