Does the GridColumn.Template work if set in the controller rather than the view? I'm trying a pretty straightforward example, but it doesn't seem to have any affect on how the cells are rendered. Is there any reason it would fail silently?
Hi Josh,This is what I've tried in the sample I'm attaching to this reply:
gridModel.Columns = new List<GridColumn>();gridModel.Columns.Add(new GridColumn("Project Id", "ProjectId", "number", "100px"));gridModel.Columns[0].Template = "Project ID: ${ProjectId}";
Thanks Borislav! I really appreciate you going to all the trouble of putting together an entire VS solution for this. Unfortunately, when run, it only displays a blank page, no grid. I went to /Model/DefinedColumns as well, but no dice, blank page.
Weird ...Can you please post a screenshot of the blank page, but with your browser's JavaScript console visible?(Firefox's Firebug will be perfect)I'm guessing that there's an HTTP request that's failing and this is why the page is blank and a JS error is also present, but I need to see what it is.Looking forward to your reply.
I was able to display the grid in your project by including ig.ui.js. However, I get the same results, the ProjectId column is only displaying the data, not the "Project ID: <ProjectID>" format defined by the Template property. I'm guessing the issue is that there's some other dependency the templating engine needs? I tried including "infragistics.templating.js", but no dice. I also tried including the files you tried to include, but I got js errors and the grid didn't render at all.
Very strange :(Josh, can you please provide me with a copy-paste of the CSS and JS files you are referencing in the MVC sample?Also, can you please tell me which version of the product are you using?I'll do my best to demystify this issue - this is a basic scenario so there must be a very slight misconfiguration that's keeping you from the successful outcome.
I'll do you one better, here's a zip of the solution:
http://www.joshnoe.com/sample-12.1.zip
Just in case that doesn't work for you, here are the references:
<title>Defined Columns</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script> <!--JS Debug--> <script src="@Url.Content("~/Scripts/ig.ui.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/infragistics.templating.js")" type="text/javascript"></script>
I got rid of the css as I don't have IIS setup on my computer and I didn't want to go through adding all the files to the project, but I assume it doesn't matter in this case.
We're using 12.1.
Thanks Josh!From what I saw, there slight misconfiguration is expressed in the fact that you are referencing the combined JS file of our controls for the previous release (2011.2).I'm saying this because ig.ui.js has been renamed to infragistics.js in 2012.1.You can become aware of the full score of the renaming that we undertook by comparing these help articles:http://help.infragistics.com/NetAdvantage/jQuery/2011.2/CLR4.0?page=Deployment_Guide_JavaScript_Files.html http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=Deployment_Guide_JavaScript_Files.html If I am to honor the folder structure of our JS files for 2012.1, the links to the JS files you need should look like this:
<script src="@Url.Content("~/Scripts/infragistics.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/modules/infragistics.templating.js")" type="text/javascript"></script>
Can you give them a try and let me know if you run into any trouble?
All I can say as a conclusion and possible explanation to the predicament is: :)Cheers,Bobby
Thanks Boris! That was it. Sorry, I thought we had replaced this file a while ago. Not sure what happened there.