Solved

How Do I Create A Floating Panel

Posted on 2009-05-12
4
1,787 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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