We are in the process of evaluating the igHierarcgicalGrid, but we have run into a problem. We managed to get it to work with just one level, but when we try to display a childband the grid does not render at all anymore.
We have a simple list of person objects which in turn have a list of appointments.
Could you show how to get the grid to display the persons with their appointments when using the Razor syntax?
At the present moment, the only way to have a column which you can use for an image button is to do as you suggest: add an empty column to your model.
The thing is, that the igGrid needs to bind to all of the columns it displays. Having a column that's not a part of the data you're feeding into the grid is actually called an "unbound column".The unbound column is one of the things on our developers' backlog of thing to do for the second release this year (2012.2) so you can look forward to it.Hope this helps you out.Cheers,Borislav
Thanks for all the replies sofar.
We are trying to figure out how to get all the things working as I write this.
We have stumbled onto something though that you might be able to help with.
We want to have a column that contains imagebuttons , we should be able to get that done with templating. But how do we get the extra column, that will contain the imagebuttons, added to the grid? Right now we are creating columns based on the model, but this new column would not be based on the model as we currently know it. If we try to add such a column we get an error returned stating that the object reference is not set. Do we need to create an empty property in the model and template it to contain an imagebutton, or is there an other way to add such a default column?
dvanmil said:However, there is a new problem. It seems the features of paging and sorting are not working properly, as the data is not getting refreshed properly. Do we need to implement some sort of paging features in our GetAccountList function to get it to work?
One final tip - most grid features such as paging and sorting can be remote (server-side) or local (client-side) and if their type isn't explicitly stated, the grid will try to guess it.So, if you are sure that you want remote paging or sorting, I'd recommend explicitly setting .Type(OpType.Remote) for the feature(s) in question.
dvanmil said:Another question. Is it possible to put images and imagebuttons inside the grid? We would like to be able to add some images depending on a true or false condition of certain columns.
Yes, it's possible :)You can define your own row template - we currently have a basic example of how to do this:http://samples.infragistics.com/jquery/grid/column-formatter
You can use jQuery templating to get the images and imagebuttons you want without too much hassle.And actually in the upcoming release (2012.1) which will hit the market very soon, we've implemented our own templating engine. In the updated Samples Browser (http://samples.infragistics.com/jquery) you will see 2 or 3 samples of putting images (and complex HTML elements) inside the grid. Cheers!Borislav
Hi!After a lot of investigating, I found out that the problem actually comes from the ClientDataSourceType option - it doesn't do its job (it doesn't set anything :( ), causing the problem with the child layout. So, you have two possiblities right now: 1. Stick with the solution you've come up with (using .DataSource()). Note that you will also need to set .DataSourceUrl if you want remote grid features (like paging for example) to work. 2. Use only .DataSourceUrl and circumvent the problem with the ClientDataSource option. Here's how you can do it - simply place this above your grid definition: <script type="text/javascript"> $(function () { $("#igGrid1").live("iggriddatabinding", function (evt, ui) { $("#igGrid1").igGrid("option", "dataSourceType", "json"); }); }); </script> It'll change the dataSourceType option (which is proxied as ClientDataSourceType in the MVC wrapper of the grid) to the correct value at the first possible moment: when the igGrid's dataBinding event is fired. I think both posibilities are equivalent, so it's up to you to choose. Let us know if you run into any other problems/questions - we'll do our best to help you out. PS: I'll still log a bug about the ClientDataSourceType option though.