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
730
TemplateDataField checkbox client side click
posted

Hello,

I'm using VS2010 with 10.3 release. I have a webdatagrid with a template and a checkbox inside. I set the onclick event for the checkbox but it never fires. I tried to catch the cellvalue changing event and check for the column key but that didn't work either.

How can I have a client side event for the checkbox to perform some validation on it if it's checked/unchecked. I want to be able to check it only if another cell was edited and has values in it. If it doesn't then cancel or return flase and the check is cleared.

here's my checkbox code:

<ItemTemplate>
    div style="text-aligncenter;">
        asp:CheckBox ID="CheckSpecific" runat="server" 
                     AutoPostBack="true" 
                     Checked='<%# Bind("IsSpecific") %>' 
                     OnCheckedChanged="CheckSpecific_CheckedChanged" />
    div>
ItemTemplate>

Thanks,

Parents
  • 29417
    Offline posted

    Hello marcgh,

     

    Please follow the link for ideas on how to  access checkbox events in a templated field:

    http://forums.infragistics.com/forums/p/25183/92986.aspx#92986

     

    In version 11.1 we have implemented BoundCheckBoxField which I strongly recommend.In it you could use the Editing_CellValueChanging client side event for the setting state of the CheckBox and the CellEditing_ExitingEditMode for catching changes in the other columns.

     

    I hope this was helpful. Don't hesitate to ask if you have further questions.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

Reply Children