[CLOSED] ImageCommandColumn change Icon on client-side issue

  1. #1

    [CLOSED] ImageCommandColumn change Icon on client-side issue

    Hello,

    we got a problem changing the icon of an ImageCommandColumn on client-side.
    If I set the Icon property on the server side to "BulletGreen" the green bullet is shown, but if I don't set an Icon on the server-side and change it to "icon-bulletgreen" on client-side in a PrepareCommand handler, the CSS class is changed for the element but no icon is visible!?

    It looks like the CSS class does not exist. Are the icon classes dynamically generated based on the used icons?

    Thanks in advance
    Last edited by fabricio.murta; Jan 22, 2016 at 6:50 PM. Reason: [CLOSED]
  2. #2
    Hello, @anwichmann!

    This is not really a dynamic CSS class, but a dynamic container to show the CSS contents. If you need the component to begin without the icon, you can use Icon.None or [/var]Icon.Blank[/var] to reserve the icon space. Then changing the css class might work.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Still doesn't work. The CSS is rendered correctly but the CSS Class is not found and no image is displayed...
    Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	31 
Size:	18.6 KB 
ID:	24399Click image for larger version. 

Name:	Unbenannt1.PNG 
Views:	44 
Size:	72.2 KB 
ID:	24400Click image for larger version. 

Name:	Unbenannt2.PNG 
Views:	34 
Size:	23.6 KB 
ID:	24401
  4. #4
    Hello,

    The CSS classes are dynamic, indeed. Just setting one icon will not release the others. So you have to specify which icon classes you want to preload if you want to switch between these on the fly. For example, for the BulletGreen icon, add this to your Page_Load in code behind:

    ResourceManager.GetInstance().RegisterIcon(Icon.BulletGreen);
    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Hello, we haven't head from you for some days. I'm closing this but feel free to update if you still don't get what you needed.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  2. Disabling MenuItems Icon at client side
    By Dominik in forum 1.x Help
    Replies: 20
    Last Post: Jun 28, 2011, 10:37 AM
  3. [CLOSED] [1.0] setting famfamfam Icon from client side
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 19, 2010, 11:03 AM
  4. Change Icon in Panel from server-side
    By jmilton in forum 1.x Help
    Replies: 3
    Last Post: Jun 18, 2009, 6:19 PM
  5. Set Panel Icon Client Side
    By Tbaseflug in forum 1.x Help
    Replies: 2
    Last Post: Apr 29, 2009, 2:21 PM

Posting Permissions