Skip to content

DataGridView Icons in Cell - Does it work the same in WiseJ 3 ? #4930

Closed

Description

@itg-assistant

edmond girardi asked 2026-01-11 00:56:05 UTC

In WiseJ 2 we used to add icons to a DataGid Row's Column to allow the user to perform actions on that row - like delete, view more info, etc..

We used to se the column to Allow HTML then add some string to the column in the row like this:

string is_Delete_Action = @"";

I'm trying this in WiseJ 3 and it just shows a blank cell. Is this method still supported in Wise J 3 ?

Activity

  1. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    Julie (ITG) answered 2026-01-13 17:00:54 UTC

    It does still work in Wisej 3.

    Try this: 

    string is_Delete_Action = "";
    

    Some things to note:

    • ?color= doesn't do anything in the URL. It can only be used with wisej widgets not HTML. There is nothing in the svg that changes the color, it's a feature of wisej widgets.

    • The img element doesn't set the size so you get icons that are way too big since svg are usually designed larger. Thus you need to manually set the size.

  2. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    edmond girardi answered 2026-01-13 17:06:25 UTC

    What about the role ? I think that’s the only way we know what icon was clicked ? I believe the color is changed by whatever in WiseJ returns the image if I remember correctly from WiseJ2

  3. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    Julie (ITG) answered 2026-01-13 18:12:21 UTC

    Role is fine, I just didn’t put it in my sample code to keep it simple

  4. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    Julie (ITG) answered 2026-01-13 18:16:09 UTC

    Also note that if you use the fontawesone characters you can set the color: var iconHtml3 = “”; You need to edit Default.html and put this in :

  5. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    edmond girardi answered 2026-01-13 22:21:19 UTC

    Looks like your last post was cut off – not showing. I was able to get the size in there and now i ca see the icons

  6. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    edmond girardi answered 2026-01-13 22:31:42 UTC

    I checked my old WiseJ 2 code and definitly whatever is returning the resource in WiseJ is also setting the color using :src=’resource.wx/Wisej.Ext.FontAwesome/times-circle-o.svg?color=red’ ” I tried setting the color as part of the style but it does not do anything

  7. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    Luca answered 2026-01-14 01:46:49 UTC

    The recoloring has always been done in javascript in the browser. You can user the embedded svg resource as a src for img but it will not recolor. It never did. It only works with Wisej.NET widgets ImageSource property. In alternative you can use the font character icons and in that case only you can use the color style since it’s a character and not an img.

  8. itg-assistant commented on Jun 17, 2026

    @itg-assistant
    Author

    Julie (ITG) answered 2026-01-14 14:12:55 UTC

    Reposting because it got cut off:

    If you use the fontawesome characters you can set the color like so:

    var iconHtml4 = "";
    

    If you do that, you need to add this to the head in Default.html:
    <

    link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
    

    />

    See attached sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions