Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
igHierarchicalGrid Load and Demand on Controller
posted

Hi

I'm working in a igHerarchicalGrid Load and Demand multilevels, all work fine, but...

I have two problems to solve:

 

1. I can not enter a RowTemplate, that I use to input an image that serves as a link to another page, I'm playing what I did in a igGrid, but no picture.

 

2. I can not format it, for example, currency, percentage, I am using the following format:

grid.Columns.Add(new GridColumn( headerText: "SALDO", key: "Saldo_Total", dataType: "number", width: "200px", formatter: "currency"));

 

I hope someone can help me, thank you for your support in advance.

NOTE: Should put more examples of using load on demand from the controller, if anyone has any example would appreciate me indicate where to get it.

 

regards

 

  • 6279
    Suggested Answer
    posted

    Hi  Christhian,

    Take a look at my MVC sample:
     

    I hope it will give you the answers to all of your questions.
    Basically, it accomplishes the two things you mentioned: a row template with a link and an image as well as a currency-formatted value.
    Both of these are applied to the Developers column layout which makes it look like so: 

    ckorrat said:
    1. I can not enter a RowTemplate, that I use to input an image that serves as a link to another page, I'm playing what I did in a igGrid, but no picture.


    Please take a look at the way I've defined the row template for the Developers column layout - let me know if this isn't the solution you're looking for.
    ckorrat said:
    2. I can not format it, for example, currency, percentage, I am using the following format:

    The problem comes from the fact that the GridColumn constructor you're using exposes the Formatter property and not the Format - this is the one you need.
    I'm basing my statement on the official documentation:
    http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=Infragistics.Web.Mvc~Infragistics.Web.Mvc.GridColumn_members.html

    Also, I know that it's easy to get confused when working with the hierarchical grid.
    Making it work with more than one column layout and load on demand is no easy feat.

    It took me about 2 weeks to understand it so don't be discouraged!
    Read the documentation and be systematic in the way you configure the hierarchical grid and you will be able to use it for any scenario you need to.

    PS: About the "load on demand" sample - I'm afraid that it should suffice - we usually have one sample for small things (things that aren't features) like "load on demand"  so the best we could do is to update the existing sample. 
    What exactly would you like to see in a sample (or samples) related to load on demand? 

    Cheers!
    Borislav