Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 649437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:56:38+00:00 2026-05-13T21:56:38+00:00

I have ModalPopupExtender that contains a UserControl that basically consists of a GridView and

  • 0

I have ModalPopupExtender that contains a UserControl that basically consists of a GridView and a HiddenField, both on an UpdatePanel. The HiddenField stores the number of the selected row. This way I avoid postbacks when selecting rows.

The ModalPopupExtender contains also some buttons that I want to disable when none of the GridView’s rows are selected. Therefore following javascript is executed in the pageLoad() method:

function trackSelection()
{
    var hf = $get('<%= SXGVSavedTemplates.ClientID %>'+ '_hfSelected');

        if(hf != null)
        {
            hf.onpropertychange = function()
            {
                var btnOk = $get('<%= btnLoadTemplateOK.ClientID %>');
                var btnDelete = $get('<%= btnLoadTemplateDelete.ClientID %>');
                var hfSelected = $get('<%= SXGVSavedTemplates.ClientID %>'+ '_hfSelected');

                var disabled = (hfSelected.value == "");
                if(btnOk != null)
                {
                    btnOk.disabled = disabled;
                }
                if(btnDelete != null)
                {
                    btnDelete.disabled = disabled;
                } 
            }
        }
}

Now this works perfectly fine. When the ModalPopup is shown the buttons are disabled. As soon as I select any of the rows the buttons become enabled. This is great. But the problem is that the UserControl with the GridView disappears! What is more when I resize the browser window it appears back again.
Note that for some reasons (don’t ask why) a CTP version of the Ajax Control Toolkit library is used in the project. Could this be the issue?

I would appreciate any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:56:39+00:00Added an answer on May 13, 2026 at 9:56 pm

    I have found a solution. Apparently the browser does not redraw the grid for some reason. Thus I forced it do do so. Therefore I modified the script adding what follows:

    var grid = $get('<%= SXGVSavedTemplates.ClientID %>'+'_gv');
    if(grid != null)
    {
        grid.className = grid.className;
    }
    

    This did the job.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a GridView which has a RowCommand event that opens a modalpopupextender on
Have an UpdatePanel that contains 2 panels with default buttons set to listen to
I have the following gridview that is inside an updatepanel: <asp:UpdatePanel ID=UpdatePanel1 runat=server> <ContentTemplate>
I have a Gridview within an UpdatePanel that shows some data from my Database.
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
I have this page where in i have a ModalPopupExtender. Now the panel that
I have a ModalPopupExtender which is, among other things, populated with a gridview (From
I have a ModalPopupExtender control and a panel which contains a iframe. The ModalPopupExtender's
I have a ModalPopupExtender that allows a customer to apply payment info. It has
I have Datalist that is inside an updatepanel and it is in panel in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.