PDA

View Full Version : [CLOSED] Changing the ImageCommand Icon for just one row in the Gridpanel



dmoore
Jul 20, 2016, 5:52 PM
Hi guys,

I'm trying to make a dynamic command in a gridpanel ImageCommandColumn that changes it's icon whenever a certain value is selected.

I am doing it from code-behind.

The name of the ImageCommandColumn is step1ImageCommand, and to accomplish what I wanted I'm using the following small snippet of code:

step1ImageCommand.Commands(0).Icon = Icon.PencilAdd;
step1ImageCommand.ReRender();

This does change the icon, but not the way I wanted. I am re-rendering all the icons for every single row, not just the row I'm working with! Not exactly what I had in mind.

So I ask, how to get the ImageCommand for just the row I'm working with?

Thanks,

D

fabricio.murta
Jul 20, 2016, 9:03 PM
Hello @dmoore!

Isn't this example what you need to base on to make the changes as you need them? Keyword would be PrepareToolbar, if I am correct.

If not, wouldn't you be able to provide a simplified, working test case in which we could work towards finding the best solution for you?

Hope this helps!