Solved

How Do I Create A Floating Panel

Posted on 2009-05-12
4
1,774 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 16

Assisted Solution

by:Walter Ritzel
Walter Ritzel earned 150 total points
ID: 24366027
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
ID: 24368010
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 16

Expert Comment

by:Walter Ritzel
ID: 24369099
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
ID: 24374522
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check number of row prior to displaying gridview 10 60
Sort GridView by ID Descending 1 17
VB.NET Textbox input validation 4 37
Access Schema 6 23
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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