Showing posts with label tag. Show all posts
Showing posts with label tag. Show all posts

Wednesday, March 28, 2012

Dynamic Animation

Hi threr;

I want create an show a dynamic animation(exactly like select tag window in this page) using AJAX Control Toolkit animation control. At frist, I dont know how can I create a dynamic animation. Second, I want to call the animation via an event instead of button click.

Hi nima_montazeri,

Check outthis post on how to dynamically create Animations. You can't cause an animation to be played in an event other than those it supports. There is a workaround you could try though. You can create a dynamic OnLoad animation in your event which will play as soon as your page is reloaded - you just have to be careful to clear it out before the next postback.

Thanks,
Ted

Monday, March 26, 2012

Dynamic Ajax Content rendering in a div tag

Hi All,

I had a requirement like, where i will do asynchrounous get of data, and load the data say 10 records in a div tag. if user scroll through the div and reaches teh end of the div tag, i will remove all conents from div and load fresh contents from 11-20 in div. Like this it goes...

Now my problem,

Step 1:- 1-10 records show in div (now user scroll to end of div)

Step 2:- Remove 1-10 records show 11-20 records in div. My Question is if user wants to see 1-10 records back, i am not able to take the user to the top since the first record is at the top of the div. I can't fire any event here.

Can anyone help on this?

Thanks in advance,

Karthikeyan.

Can you poste some code? I get the idea but I want to see what even handler you are using to track the scrolling in conjunction with the records being scrolled. Perhaps also you might want to use hidden fields that put the value of the previous set of pages (in your case 1-10).


Hi,

Thank you for your post!

I suggest you keep 20 records in the div, and just display half of them.

Then, when you want get the pre 10 records, just do it like you get the next 10 Records because you can fire some events of the scroll.

If you have further questions,let me know.

Best Regards,

Wednesday, March 21, 2012

DropDownExtender positioning error

If the target control of a DropDownExtender is used in a control or div tag that has absolute, relative or fixed positioning the dropdownlist will incorrectly position below the target control.

The actual context menu will be displayed in the correct place but the hover panel that looks like a standard dropdownlist control will be displayed incorrectly. See the following link for more information and screenshot of the problemhttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=10075


Here is an arbitrary example. The real problem is when this control is used in third party grids that make use of relative positioning of some of their outer elements.

Has anybody else encountered this problem? Anybody know how the DropDownExtender javascript/CSS could be updated to correct this issue?

Example code

<div style="position:fixed">
<asp:Label ID="Label2" runat="server" Text="Select action"
Style="display: block; width: 100px; padding:2px; padding-right: 50px;" />
</div
<asp:Panel ID="Panel1" runat="server" CssClass="ContextMenuPanel"
Style="display :none; visibility: hidden;">
<asp:LinkButton runat="server" ID="LB1" Text="Mocha" CssClass="ContextMenuItem" />
<asp:LinkButton runat="server" ID="LB2" Text="Java" CssClass="ContextMenuItem" />
<asp:LinkButton runat="server" ID="LB3" Text="None" CssClass="ContextMenuItem" />
</asp:Panel
<ajaxToolkit:DropDownExtender runat="server" ID="DropDownExtender1" TargetControlID="Label2" DropDownControlID="Panel1" />

I'm having the same problem. It started after installing the latest build. The problem is not limited to 3rd party controls. Even the slightest modification of the Ajax dropdown example to position the target element creates this problem

Example code: -- same as dropdown example in the AJAX Samples: (For the sample, the problem occurs with either "relative" or "absolute")

<divstyle="position: relative"><asp:LabelID="TextLabel"runat="server"Text="Hover Over Me"Font-Names="Tahoma"Font-Size="11px"Style="display: block; width: 300px; padding:2px; padding-right: 50px;"/></div><asp:PanelID="DropPanel"runat="server"CssClass="ContextMenuPanel"Style="display:none;visibility:hidden;"><asp:LinkButtonrunat="server"ID="Option1"Text="Option 1"CssClass="ContextMenuItem"/><asp:LinkButtonrunat="server"ID="Option2"Text="Option 2"CssClass="ContextMenuItem"/><asp:LinkButtonrunat="server"ID="Option3"Text="Option 3 (Click Me!)"CssClass="ContextMenuItem"/></asp:Panel><ajaxToolkit:DropDownExtenderrunat="server"ID="DDE"TargetControlID="TextLabel"DropDownControlID="DropPanel"/>