Avatar of meispisces
Flag for India asked on

How to change the image of gridview cell at runtime?

I have a gridview that contains a column name "History" which has Plus (+) image button.

Clicking on the plus image button results in addition of new row beneath. Insertion of a new row should change the image of Plus image button to Minus (-) image button for that particular parent row only. Rest of the rows should have the Plus image button.

Q1. How to know the row index of the selected row, so that a image could be changed?

Secondly,If i click on Minus Image button, that should reset to Plus Image button and the added child row shouldn't be seen.

Q2. How to change the image back to Plus Image button?

I have added the Plus image button in gridview template field. Hence when grid is being loaded, Plus image is visible.

Please advice!

ASP.NETC#.NET Programming

Avatar of undefined
Last Comment

8/22/2022 - Mon

no comments?
Deepak Lakkad

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck