Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Wednesday, March 28, 2012

Programmatic Animations

We've got a new app where we are using the Accordian control like the blade interface on XBOX Live and we're building the Accordian control, and adding an updatepanel and adding a UpdatePanelAnimationExtender all programatically from a XML config document. However, I'm not sure how I can add a FadeEffect (http://ajax.asp.net/ajaxtoolkit/Walkthrough/AnimationReference.aspx#FadeAnimation). Here's thw code snippet.

Sean

AjaxControlToolkit.

AccordionPane pane =new AjaxControlToolkit.AccordionPane();

pane.ID = node.Attributes[

"Id"].Value;Label lblHeader =newLabel();

lblHeader.Text = node.Attributes[

"Header"].Value;

pane.HeaderContainer.Controls.Add(lblHeader);

pane.HeaderCssClass = node.Attributes[

"HeaderCss"].Value;

pane.ContentCssClass = node.Attributes[

"ContentCss"].Value;

UpdatePanel updater =newUpdatePanel();

updater.ID =

"updater" + node.Attributes["Id"].Value;

updater.UpdateMode =

UpdatePanelUpdateMode.Conditional;

pane.ContentContainer.Controls.Add(updater);

ProphitAccordion.Panes.Add(pane);

//Since the updater panel is created programatically we'll create our animation for the//updater panels also. Sean

AjaxControlToolkit.

UpdatePanelAnimationExtender upAnima =new AjaxControlToolkit.UpdatePanelAnimationExtender();

upAnima.ID =

"upda" + node.Attributes["Id"].Value;

upAnima.TargetControlID = updater.ID;

AjaxControlToolkit.

Animation updaAnimation =new AjaxControlToolkit.Animation();

updaAnimation.Properties.Add(

"id", ("updaAnimation" + updater.ID));//The following line doesn't work

AjaxControlToolkit.

Animation.FadeEffect upAnFade =new AjaxControlToolkit.Animation.FadeEffect();Hi Sean,

Check outthis post for details on how to dynamically create animations on the server side.

Thanks,
Ted

I know I am a little late to teh party (story of my life), but the link about doesn't work anymore and I am in desperate need of creating animations server side. Different colours for different actions, dynamically created update panels etc. This is about the only subject I can't find any info on, except this one solitary post - and now that's dead.

Saturday, March 24, 2012

Question about DragPanel implementation

I'm building a dragbuttonextender which purpose is to extend button control so that it can be dragged and dropped. In AjaxControlToolkit's implementation of DragPanel in FloatingBehavior.js there is a functioncheckCanDrag which looks like:

this.checkCanDrag = function(element) {
var undraggableTagNames = ["input", "button", "select", "textarea", "label"];
var tagName = element.tagName;
if ((tagName.toLowerCase() == "a") && (element.href != null) && (element.href.length > 0)) {
return false;
}
if (Array.indexOf(undraggableTagNames, tagName.toLowerCase()) > -1) {
return false;
}
return true;
}

My question is:Why are buttons and input controls undraggable?

I wrote my extender (which extends ASP.NET Button controls) and I can drag&drop buttons. The problem is that when drag&drop ends a full postback occurs and position of the button is restored to its original location. When I use my extender (which is currently almost identical to AjaxControlToolkit's DragPanelExtender except checkCanDrag function) to extend ASP.NET Panel control then everything works fine and panels are placed where I dropped them. When I put buttons in a panel and attach my extender to this panel, again everything works fine. So, why can't buttons be extended just like panels are extended?

Anybody?

Wednesday, March 21, 2012

question about updateprogress control

Hi Everyone,

I'm building my first pages with AJAX. I have added a two updatepanels. One has the selections for my users searches, the other the viewgrids with the information they get back. It all works great. One option in for the viewgrids is to have the first column show as a link, and that brings back another smaller grid with the detail list for that selection they've clicked on. Works great -- brings back the info. I've added a updateprogress control to let them know the page is working when the click and it works great. Only problem I am having is that the updateprogress control is up above my main grid. If they are near the top, they see it, but if they are further down the page, they won't see it, plus they won't see the details grid when it is done building. Is there any way I can bounce them to the top of the report? Some sort of repositioning? How is this normally done?

thanks!

jekerry

You can try to use AlwaysVisibleControl, I think it will help you.

http://ajax.asp.net/ajaxtoolkit/AlwaysVisibleControl/AlwaysVisibleControl.aspx


That looks really good, only problem is that I am not sure how to get it added to my project! I have downloaded the toolkit to a folder on my harddrive, but have to admit I am not sure what do past that step.

thanks,

jekerry


Hello, please take a look athttp://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx

Thank you! Just what I was looking for but somehow hadn't stumbled across.

jekerry