views:

588

answers:

1

I want to implement asp.net ajax animation (row color fades/changes from red back to white when a linkbutton is clicked) on a gridview row, and I want to do it in the code behind in c# (in the linkbutton_click event).

Is this possible?

A: 
                            AnimationExtender rowFader = new AnimationExtender();
                        rowFader.TargetControlID = tr.ID;
                        rowFader.ID = "aeRowFader-" + rowToFade_;
                        string animationXML =
                            @"<OnLoad>
                                <Sequence>
                                    <Color PropertyKey=""color"" StartValue=""FFFF00"" EndValue=""#FFFFFF"" />
                                    <FadeIn />
                                </Sequence>
                            </OnLoad>";
                        rowFader.Animations = animationXML;


                        rowToFade_ = 0;
                        column1.Controls.Add(rowFader);

I'm not sure if you HAVE to add the control to a cell in the row, but it seems to work

Will
What is rowToFade_ ?
Sam
a number indicating which row in the table i wanted to use the fader on, so if they click on row X, rowToFade will be X
Will