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
1910
RowDeleting ButtonHtml - different on each row
posted

Is there a way to change the ButtonHtml of the Delete button based on a particular field on that row?

Example:
Row       Field1     ButtonHtml
-------    --------   -----------------
Row1        A         "Delete"
Row2        B         "Recover"
Row3        A         "Delete"

Right now, the ButtonHtml is the same for all rows.

Parents
  • 2680
    Verified Answer
    Offline posted

    Hello Angela,

    Thank you for contacting us.

    Yes, this is possible. You should use TemplateDataField for the column with the buttons. Then on OnInitializeRow event of the grid you could change the text of the button based on some logic, the entire row is available.

    I am attaching a sample demonstrating this.

    Please feel free to contact me if you need further assistance.

    RowDifferentButton.zip
Reply Children
No Data