Starts in:
1 DAY
19 HRS
17 MIN
20 SEC
Starts in:
1 D
19 H
17 M
20 S
Open Closed

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


User avatar
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)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

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

  • User Avatar
    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?
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

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

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06