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
985
Button events in WHDG
posted

I have a whdg with 2 bands. On the second band I have a column which contains buttons. How can I reach the click event of said button(s)?

Parents
  • 5739
    Verified Answer
    posted

    Hi,

    For VB in your markup:

    <ig:TemplateDataField Key="InsertNewLine">
     <ItemTemplate>
            <asp:LinkButton runat="server" ID="lnkInsertLine" CommandName="Insert" CommandArgument='<%# DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "AutoNumber") %>' >I</asp:LinkButton>                       
            </ItemTemplate>
    <Header Text="" />
    </ig:TemplateDataField>

    You can access any field you like and you can also access the row.index.

    In you server side code you capture the itemcommand event of the WHDG and the commandargument will contained the passed values.

    Ed

     

     

Reply Children
No Data