Hello,
I am developing a C# asp.net application and using the AJAX control toolkit.
I am using the AnimationExtender in order to add a fade effect to my page.
The AnimationExtender is a part of a gridView, since I wanted every row in the gridView to fade seperately.
Here is the gridView's code:
<asp:GridView ID="gvDocuments" runat="server" BorderWidth="0" ShowHeader="false" AutoGenerateColumns="False" Width="90%">
<Columns>
<asp:TemplateField HeaderText="Ticker">
<ItemTemplate>
<asp:Panel ID="pnlDoc" runat="server"><%# DataBinder.Eval(Container, "DataItem.docStart") % ></asp:Panel>
<asp:Panel ID="pnlQuote" runat="server"><%# DataBinder.Eval(Container, "DataItem.quote") %></asp:Panel>
<AjaxToolkit:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="pnlQuote">
<Animations>
<OnLoad>
<Sequence>
<FadeIn Fps="20" Duration="0.5" MinimumOpacity=".1" MaximumOpacity="1"/>
</Sequence>
</OnLoad>
</Animations>
</AjaxToolkit:AnimationExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView
The Grid is placed within an updatePanel with a timer.
What I would like to do is disable the AnimationExtender on some cases.
I tried using RowDataBound event:
((AjaxControlToolkit.AnimationExtender)e.Row.FindControl("AnimationExtender1")).Enabled = false;
And got an exception.
Is there a way to do that?
Thank you
Hello,
I do not see the handler defined for RowDataBound on your grid view. Could you provide us with your gridview with this defined and the code behind for RowDataBound and the exception?
Also, did you try to override page render and get teh control inside the grid's row?
Regards,
Louis
Sorry, my mistake.
I forgot to add:if (e.Row.RowType ==DataControlRowType.DataRow)
So, it failed when going over the header first.
Thank you for trying to help...
No comments:
Post a Comment