Hello,
I downloaded the trial version of .net web components and I need to access a WebDataGrid in client side.
I configured web.config file as seen in http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=6158. so I have my local javascript infragistics folder pointing to my local folder: (My web.config file is as follows...)
<infragistics.web imageDirectory="C:\Program Files\Infragistics\NetAdvantage for .NET 2008 Vol. 3 CLR 2.0\ASP.NET\Images" cssDirectory="C:\Program Files\Infragistics\NetAdvantage for .NET 2008 Vol. 3 CLR 2.0\ASP.NET\Styles" formsDirectory="C:\Program Files\Infragistics\NetAdvantage for .NET 2008 Vol. 3 CLR 2.0\ASP.NET\Forms" styleSetName="Default" styleSetPath="~/ig_res" javaScriptDirectory="~/Scripts" />
I created a Script folder in my project directory, and copied all *.js files on it, and added javascript links in my aspx file.
No luck. A simple call to var grid = igtbl_getGridById("WebDataGrid1"); raises an error.
My version is NetAdvantage for .NET 2008 Vol. 3 CLR 2.0.
Please, any help/clue will be appreciated.
Refer back to one of the earlier posts I made in the thread:
var grid = $find("<%= WebDataGrid1.ClientID %>");
This will give you a JavaScript reference to the control whose server-side ID is "WebDataGrid1". The <%= %> markup is a way to run server-side code (in this case, to get the control's ClientID property) inline in an ASPX page.
Thanks for the reply.
Unfortunately, I think I am missing something...
I should have my assemblies referenced in my aspx file. So, a simple var myGrid = new Intragistics.Web.UI.WebDataGrid(); in a javascript function should work... correct?
But this is giving me an error.
Maybe if I sleep some hours I will do this more cleary!
Thanks.
I ask primarily because WebDataGrid and WebGrid have a different CSOM. This means that they use entirely different JavaScript than each other.
I'm not suggesting that you switch out WebDataGrid for WebGrid in your application. The only reason you would do that is if you want to use that conrol. It's simply important to know so that I can steer you in the correct direction.
Since you're using WebDataGrid, you don't want to use the utility functions defined for WebGrid, since these utility functions won't recognize WebDataGrid. My understanding is that WebDataGrid uses "utility functions" exposed by ASP.NET AJAX Extensions, such as the $find() function I mentioned in a previous post.
For information on the CSOM of WebDataGrid, you'll want to look at the following help articles (these links lead to the articles in our online help documentation of NetAdvantage for .NET 2008 Volume 3):
Shared CSOM Overview (for all Aikido controls)WebDataGrid CSOM Overview
Hi again!
I am working with WebDataGrid component. So then, maybe I should use normal DOM javascript for tables to access this values... correct?
Or... should I rearrange my project to use UltraWebGrid?
Please, any suggestion will be welcomed.
Thank you very much!
Jacobo said:I think I know the differences for now... but... is it normal that a call to igtbl_gteGridById(...) produces an error?
If you're using WebGrid, are you certain that you're passing in the ClientID of your grid control? If your WebGrid is in a naming container (such as user controls, master pages, content pages, WebTab controls, and many others), then the ClientID of your grid will be different than its server-side ID property. In this circumstance, if you passed in the server-side ID instead of the ClientID, then this result would be normal.
Can you confirm which of the two controls you're working with?