• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

abs
#1 Posted : Thursday, April 19, 2007 6:28:54 AM(UTC)
abs

Rank: Member

Joined: 7/28/2006(UTC)
Posts: 79

How easy would it be to modify the admin content block to use ajax when we move a product up and down in the Product Grid.


I'm trying to avoid the page refresh sinces its a long list of images and you have to scroll around to find the image you are moving up. I'm thinking that there is a code option that remembers where your scroll bar is when it refreshes but can't think if its ASP.NET or Ajax feature.



Its not that important though, just a nice user experience.



Anthony
Andy Miller
#2 Posted : Thursday, April 19, 2007 1:29:43 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Many of the admin pages in SP2 are using Ajax. Which page are you using?

See tip 1 in this article regarding the scroll bar.

[http://weblogs.asp.net/dwahlin/archive/2007/04/17/simple-asp-net-2-0-tips-and-tricks-that-you-may-or-may-not-have-heard-about.aspx]
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
abs
#3 Posted : Friday, April 20, 2007 6:10:31 AM(UTC)
abs

Rank: Member

Joined: 7/28/2006(UTC)
Posts: 79

Which article? :)
abs
#4 Posted : Friday, April 20, 2007 6:12:32 AM(UTC)
abs

Rank: Member

Joined: 7/28/2006(UTC)
Posts: 79

I'm using /BVAdmin/Content/Columns_EditBlock.aspx - Product Grid to layout 9 images on the home page
Andy Miller
#5 Posted : Friday, April 20, 2007 10:50:21 AM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
The words "this article" are linked to the article (there were some strange characters at the end of the URL which I have corrected).



The Product Grid editor is not "Anthemized"...that is why it does postbacks. You can quickly add Anthem like this:



1. Add this reference to the top of BVModules/ContentBlocks/Product Grid/editor.ascx

Code:


&lt;%[color=#0000ff>@</FONT>]Register[/color] [color=#ff0000>Namespace</FONT>AssemblyTagPrefix

2. Change all 4 occurances of "asp:Panel" to "anthem:Panel" (there are 2 panels and you are changing the start and end tags = 4 tags).



3. Add AutoUpdateAfterCallBack="true" to both &lt;anthem:Panel&gt; tags. For example,


Code:

[color=#0000ff>
&lt;:]<FONT color=#ff0000>ID[/color][color=#0000ff>="pnlEditor"runat]<FONT color=#ff0000>DefaultButton[/color][color=#0000ff>="btnNew"AutoUpdateAfterCallBack<FONT]="true"&gt;
[/color]

After making these changes I was able to add and remove products and change the order of the selected products all using callbacks. That is the extent of my testing. Be sure to keep a backup of the page without these changes in case you discover any wierdness down the road.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012