Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Animated GIF in DataGridViewImageCell
 

Animated GIF in DataGridViewImageCell

Hi

Is it possible to display animated GIF in DataGridViewCell?

It has to be repaint in order to update frame however I do not know how to force Paint method. Can anybody help me how to do it? There is no Invalidate method for the cell.'

Thanks

Ela

e_LA  Tuesday, August 22, 2006 8:39 AM
Painting an animated gif will only show its first frame. A datagridview paints the image to display it so showing an animated gif is not really possible. An animated gif will play in a picture box. When a cell goes into edit mode it shows a control for editing. Maybe you could create a custom column to display a picture box when the cell goes into edit mode and play the animated gif.
Ken Tucker  Tuesday, August 22, 2006 11:11 AM

Hi

I did it - almost - a few minutes ago. I created my own column and cell class and I use ImageAnimator in order to animate image. The image blinks however instead of gif I see x as it was no defined gif. When I display this gif in Internet Explorer it blinking OK. My image is shown. Is there any trick in the grid?

For sure everything is OK with animated gif.

e_LA  Tuesday, August 22, 2006 11:57 AM

Hi

I have created my own DataGridViewImageCell class and I display and animate GIF in that. It doesn't display frames but only x. What is wrong. Can anybode help me?

I used such a piece of code

if (Animated)

{

if (!isAnimating)

{

if (ImageAnimator.CanAnimate(im))

ImageAnimator.Animate(im, new EventHandler(animate));

isAnimating = true;

}

ImageAnimator.UpdateFrames(im);

}

private void animate(object o, EventArgs e)

{

this.DataGridView.InvalidateCell(this);

}

Thanks

Ela

e_LA  Friday, August 25, 2006 8:50 AM

You can use google to search for other answers

Custom Search

More Threads

• Insert a Column into a dataGridView?
• how to show data in dataGridView by using my own dataset
• Datagridview master detail case sensitivity issue
• Serious error with selectedindexchange
• i am using .NET framework 1.1 so can i add combobox in datagrid?
• Problem with DataMember of DataGridView
• last ditch effort.... DatagridView Array to contain a group?
• Problem with AxOWC11.AxSpreadsheet control
• Sorting ListView
• DataGridView Formatting Question