Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How Do I Create A Floating Panel

Posted on 2009-05-12
4
Medium Priority
?
1,792 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 600 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

772 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