Hello,
Im havign problems with my ig_common VD not accessing my javascript files. Im using VS 2005 and the 7.3 version on your controls. I created my VD pointing to 'C:\Inetpub\wwwroot\aspnet_client\Infragistics\' this is where my versions of the controls are and subfolders (Forms, Scripts, etc). I have added the assemblies in the web.config.
I made a sample page by dragging the UltraWebTab to the page and put a simple label and textbox in there. All I want to do is grab the text of the textbox by using the javascript function ' igedit_getById()' but when debugging it says its not defined, so its not being found. I did no more than that, so if Im missing a step (referencing the js files in the web.config?) This is just a simple example I put together to grab the value of the label, so that I can then add it to my larger project when I get this all figured out. And the javascript function I created is inline with the page, using the ' igedit_getById()' function
Thanks.
Can you post the code your trying to execute?
Unless your using customized JS script files, you actually should not need to create the ig_common directory. Beginning with our CLR2.0 assemblies we began embedding the script files directly in the assemblies as WebResources so in your page you shold see a bunch of script tags with src links to WebResource.axd. The only reason you need the ig_common directory anymore is if you are using presets which need to find images.
If you run the page without the call to getById does the page function normally?
Devin
Though your response was to csharpsean, I still susp[ect our issues are related. In my case, I have two projects. One is a test project i created from scratch, dragged a WebGrid onto a page, attached a datasource to my table in SQL Server, and built the project. I then created a Virtual Direcotry in IIS to point to it and voila, it displays the data and the things that use built-in scripting all seems to work.
The second project, the one I am using to evaluate the product, was an existing project that was using Microsoft's GridView. After much frustration trying to hand-edit the .ascx (frustration due to the fact I couldn;t find decent documentation of the actual page markup for the WebGrid), I pulled out my grid definition and copied and pasted the one from the test project. I rebuilt and now that displays my content in the grid within my page fo that application - except that when it first displays and anytime the mouse goes over any portion of the grid, i get javascript obect not found errors. When I tell it to debug in VS2005, it is on a call vias the link to WebResource.axd, which is what suggested to me that it can't seem to find the scripts.
The test project that WORKS (created from scratch) has the folowing registration line at the top of the aspx file:
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
The project in which javascript errors occur has the following registration line at the top of the aspx file:
The biggest difference, though I can think of no valid reason why it should matter, is that in my real application, the grid is 3 levels deep in the following hierarchy:
applicationPage.aspx
toplevelControl.ascx
myUiControl
UltraWebGrid
myUIControl
someotherUIControl
So as you see, I have a page that consists of a single form containing a top level ascx control. The top level ascx control contains 3 instances of a next level UI control that provides standard interaction to various subsets (lists) of data, as well as a final control at the bottom of the page that provides some other interactions. That UI Control contains a grid that is used to display the list of data being interacted with. In this particular situation, which multiple controls can be displayed, the user permissions determine which lists they see, and generally (and currently in testing) only 1 of the user controls is actually displayed, the other two have Visible-"False" on a div containin g the UI control, so while there are actually 3 controls with grids that get created, only one is visible or has data in the grid. Again, none of this should matter in my opinion, but I figure it's worth painting the whole picture.
The one other file I thought might affect me is the web.config. The test project that works has the infragistics components referenced in the web.config as follows:
<assemblies>
<add assembly="Infragistics2.WebUI.Shared.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
So, to match it, I also have my real project that does NOT work with the following in the web.config:
<compilation debug="true">
<add assembly="Infragistics2.WebUI.UltraWebGrid.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
Again, they match but it diudn't help.
My references are also idential in my projects. So it's a real mystery to me.
Fortunately, my boss has extended through tomoorow for me to eval the product, so hopefully I can get past this before we have to just go with Telerik instead.
I found what to me is a workaround - though doable. Perhaps this will work for csharpsean as well (one can hope.) I found an article (now I can;t find it again) talking about a javascript problem when you have LoadOnDemand="XML". Even though I don't have LoadOnDemand="XML" set, I decided the solution was worth a shot. It tells how to place into web.config, a section that tells infragistics where to look for javascript files.
<section name="infragistics.web"
type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<infragistics.web imageDirectory="~/images/Images" javaScriptDirectory="~/scripts"/>
Doing this, my script errors went away and now I can continue with my eval. Of course, ultimately, I would like to know why this should be necessary, and getting an answer on this that resolves it would go a long way towards convincing me that support for the product is better than what I have read in some postings (always better to learn from my own experience than just other people's rantings.)
Ed Hinton
I have to jump in here as well. I have a web page in which I need to capture the title value of the clicked item from a ListBar control. I have the client side script event to fire after the item is selected but when I attempt to run the following code:
var editor = igedit_getById("ResponseText");
editor.setText(oItem.Element.title);
}
I get an exception on the igedit_getById call that an object is expected.
I'm having the same problem except that the call to igtbl_getGridById is working and the call to igtbl_addNew is not being recognized. What's even more crazy is that this works fine on another page on the same website.
I think I know what is going on - the grid has several javascript files (for performance reasons) and loads them depending on property settings. If you have not enabled AllowAddNewDefault property on the DisplayLayout setting, the javascript file containing igtbl_addNew will not be included. The solution is to set the property, for example:
gridName.DisplayLayout.AllowAddNewDefault = AllowAddNew.Yes;
For more information, you can also check out the discussion in this forum thread:
http://forums.infragistics.com/forums/t/11112.aspx