Solved

How Do I Create A Floating Panel

Posted on 2009-05-12
4
1,746 Views
Last Modified: 2013-11-07
I have a large ASPTable grid, 10 Columns by 50 Rows. When a user selects a cell, an ASPPanel appears with some controls in it for them to modify.  I currently have the ASPPanel appearing at the bottom of the ASPTable, but it's annoying because you have to scroll to the bottom of the page to modify the values in the ASPPanel if you are selecting a cell at the top of the ASPTable.  I would like to know if there is a way to get the Panel to float on the right side of the ASPTable at the top of the page and as you scroll down have the ASPPanel scroll with you so the ASPPanel is always at the top of the page and visible...?
0
Comment
Question by:Ben Santiardo
  • 2
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:Walter Ritzel
Walter Ritzel earned 150 total points
Comment Utility
My suggestion is that you take a look on this article:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=212&AspxAutoDetectCookieSupport=1

0
 

Author Comment

by:Ben Santiardo
Comment Utility
Ok, I looked at what you supplied, and after a horribly undocumented installation process I finally got AJAX set up on my system.  Only to realize that the ModalPopup Control appears to function on off of a single control.  I have a grid where I would want the PopUp to appear if they click a cell.  In other words, I would need a way to "force popup" using JavaScript.  
Is that possible?  If not, then this won't be useful to me.
0
 
LVL 15

Expert Comment

by:Walter Ritzel
Comment Utility
So, according to your post, you already have your solution of clicking on a cell and calling a panel with the controls working. With the article I provide, you should be able to change what you have working currently to open with a modal popup.
0
 

Accepted Solution

by:
Ben Santiardo earned 0 total points
Comment Utility
Well, this ultimatly worked for my purposes thank you, although figuring it out was painful.  Ends up being that be default the AJAX control is activated by a single control as I stated in my previous post.  After exhaustive searches online, I found that I could "unregister" the control bound to the activation property of the AJAX control and "reregister" a new one (I will attach the code for anyone else interested).  This JavaScript allowed me to reregister the control with a new activating control and then cause a manual show.  I just added a call to this method inside each onClick event to the labels which I wanted to cause a popup to appear.
Note: On the actual "$create" command of the script attached, you need to replace it with your generated create command and then just modify the very last property "$get()" to use the StringID passed to the function.

function js_ShowPopupControl(p_strControlID)

{

    //************************************************************************

    // Procedure/Function: js_ShowPopupControl()

    // Author: Ben

    // Created On: 5/12/2009

    // Description:

    //      Reregisters the activating control for the ModalPopupExtender.

    //************************************************************************

    

    //***************************************

    // Initialize Variables

    //***************************************

    var strModalPopupExtenderID = 'ModalPopupExtender';

    

    //***************************************

    // Clear Currently Registered "Activator" Control

    //***************************************

    if($find(strModalPopupExtenderID)){$find(strModalPopupExtenderID).dispose();}

    

    //***************************************

    // Register New Control As Popup Activator

    //***************************************

    $create(AjaxControlToolkit.ModalPopupBehavior, {"BackgroundCssClass":"modalPopup_Background","CancelControlID":"ctl00_MainContent_linkScoreBucket_Cancel","DropShadow":true,"OkControlID":"ctl00_MainContent_linkScoreBucket_Update","OnOkScript":"js_Show_BucketLabelForCurrentCell()","PopupControlID":"ctl00_MainContent_panelDescription","dynamicServicePath":"/RegentsWeb/ASP_Files/Manager_ScoreBucket.aspx","id":"ctl00_MainContent_ModalPopupExtender"}, null, null, $get(p_strControlID));

    

    //***************************************

    // Show Popup

    //***************************************

    $find(strModalPopupExtenderID).show();

}

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now