Refresh Spreadsheet Display

Posted by: Luis.Alvarez on 23 August 2018, 4:18 am EST

  • Posted 23 August 2018, 4:18 am EST


    My application adds and deletes image files to be displayed in cells. I used a _MouseDown event to delete and add pictures. I noticed that my spreadsheet display was displaying the original image and not the added image. I got the spreadsheet to properly display the added image after I included gcSpreadSheet1.Invalidate() at the end of the event handler. I also need an _EditEnd event to handle user inputs to the cells and this event handler also removes and adds images based on the input. I also noticed that the spreadsheet was not being updated so I added the Invalidate() line at the end of this event. This addition causes a StackOverflowException due to the _EditEnd event being called in a loop. If I comment out the the AddPicture and the Invalidate() lines the spreadsheet does show the image being removed. I have also tried adding the autorefresh = False/SuspendEvent at the beginning of the event handler and ResumeEvent()/autorefresh = True at the end and the Spreadsheet still shows the original image.

    Thanks for your help,
  • Marked as Answer

    Replied 23 August 2018, 6:09 pm EST

    Hi Luis,

    I would suggest you to use MouseUp event instead and do not use the Invalidate() method in EditEnd event. In case your issue still persists, please provide me a sample application to debug further.

    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels