0

I've recently updated my ASP.NET project to .NET 4.5 (from 3.5) . This led to ClientSideEvents not firing properly on my Infragistics UltraWebGrid.

The problem is that in my .aspx file I have configured a client side event on the UltraWebGrid like this:

<ClientSideEvents ClickCellButtonHandler="webGridSoftwareConfigurations_CellClickHandler" />

And in a js-file I have the following:

function webGridSoftwareConfigurations_CellClickHandler(gridName, cellId) {
    // Do some stuff
}

Previously, when I clicked in a cell, the javascript function was triggered. But now after the update to .NET 4.5, nothing happens. I'm using Infragistics2, Infragistics.Web.dll with version 11.1.20111.2112

Joel
  • 8,502
  • 11
  • 66
  • 115
  • The change in the version of the .NET framework shouldn't impact this behavior. Were there any other changes? Also are there any JavaScript errors on the page? – alhalama Aug 09 '13 at 15:12
  • I just noticed that `WebAsyncRefreshPanel`s also malfunction since the update to .NET 4.5. Instead of reloading just the panel, the whole page is reloaded. – Joel Aug 16 '13 at 08:35
  • again are there any JavaScript errors on the page? Also the WebAsyncRefreshPanel could fail if the markup on the page isn't valid for example if you have opening tags that aren't closed. – alhalama Aug 16 '13 at 12:37
  • I've updated my project to use NetAdvantage 2011 (for .NET 3.5) and now the `WebAsyncRefreshPanel`s work as they should. I'm getting no javascript errors, but I'm weirdly enough getting a javascript exception (originating from some infragistics code) while debugging (caught in Visual Studio). I figured out it had to do with how asp controls are named in .NET 4x and found the solution to my problem here http://stackoverflow.com/questions/4437717/asp-net-2-5-prefixing-ctl00-and-asp-net-4-not-prefixing-ctl00 – Joel Aug 19 '13 at 09:26

1 Answers1

0

I think the root of my problems were actually caused by the fact that ASP.NET 4.x changes how the controls ids are generated. Before, the ids were prefixed with ctl00 and the older Infragistics NetAdvantage controls seem to be dependent of this.

My solution was to:

First, update Infragistics NetAdvantage to a more recent version (NetAdvantage 2011). There are newer version but this one still supports .NET 3.5, and I need this since I can't update all my projects that use Infragistics NetAdvantage to .NET 4.5

And then update the web.config so that we use the old way of naming controls:

<configuration>
    <system.web>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" >

Thanks to this answer, and this blog post by Scott Gu.

Community
  • 1
  • 1
Joel
  • 8,502
  • 11
  • 66
  • 115