Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Trying to enable / disable a grid when used inside an UpdatePanel
posted

Hi, I've been doing battle with this for over a day now without success. Any geniuses out there with an idea?

I have a WebGrid inside an UpdatePanel (to make use of Ajax).

I have two buttons, the first disables the grid by setting DefaultLayout ...

table.DisplayLayout.ReadOnly = Infragistics.WebUI.UltraWebGrid.ReadOnly.LevelZero;

The second button enables the grid again using the following line...

table.DisplayLayout.ReadOnly = Infragistics.WebUI.UltraWebGrid.ReadOnly.NotSet;

My first problem - when I click the disable button, the grid does disable. Unfortunately, it doesn't stop at the grid. Nothing works on the form from that point on. Clicking buttons on the page has no effect - the events are not running. It seems that setting table.DisplayLayout.ReadOnly to Infragistics.WebUI.UltraWebGrid.ReadOnly.LevelZero totally wipes all the client-side script on the form. If I remove the UpdatePanel from the form it does work as expected, but this isn't an option unfortunately.

I've tried other approaches such as enabling / disabling the grid client-side. For example, I tried the following script...

function SetReadOnly(tableid)

{

     var oGrid = igtbl_getGridById(tableid);
     if (oGrid != null)

     {

          oGrid.Element.disabled = true;

     }

}

This doesn't seem to work either, complaining that the Element object of oGrid is null.

I'm totally lost. Is there a known limitation with using Grids inside Ajax UpdatePanels?

I'm using the following version of the grid...

<%@ Register TagPrefix="igtbl" Namespace="Infragistics.WebUI.UltraWebGrid" Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.1061, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>

 

Anyone with any ideas would be ENOURMOUSLY appreciated.

Parents
No Data
Reply
  • 7694
    posted

     Hello,

    I am trying to reproduce the issue, unfortunately to no avail.  I am not completely sure at what version we provided support for asp:UpdatePanel -- you may contact Developer Support at the following link for additoinal details.  http://es.infragistics.com/support/

    You can also try using our own WebAsyncRefreshPanel control which we developer prior to UpdatePanel and which does pretty much the same -- you may get better results this way.

    Hope this helps.

    WebSite13.zip
Children