BLACK FRIDAY
From November 21
to December 02
99Days : 99Hrs : 99Min : 99Sec
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

How to set the text of one of the action button according to property of object returned? #3787


0
uyarbtrlp created

Hello ABP,

I've been trying to set the text of one of the action button programmatically. I've tried the method that we have on action or visible properties.

But I've got meaningless information as you can see on image below.

How can I set the text according to some properties returned by the API?

Thanks. BR, Baturalp

  • ABP Framework version: v5.3.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC)): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

4 Answer(s)
  • 0
    maliming created
    Support Team

    hi

    text is currently just a property, not a callback method.

  • 0
    uyarbtrlp created

    So, it is not possible to use like that. According to that, I have two questions:

    • Do you have any plan to convert it to a callback method?
    • Should I create separate buttons for that? What is your suggestion?
  • 0
    maliming created
    Support Team

    hi

    1. Yes, You can create a GitHub issue, I will do that in 7.0
    2. You can override the datatables-extensions.js file and make text as a callback.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

  • 0
    maliming created
    Support Team

    https://github.com/abpframework/abp/pull/14219