[Help] Ext.grid.ColumnModel Multiple dataIndex Possible?

  • Hi again guys, another - most likely - simple question from me again!

    I'm starting to move along with ExtJS and have no got to the point where im looking at building a simple test application to demonstrate the powers of ExtJS to the rest of my colleagues at work + management.

    Im wanting to know if its possible to use the Ext.grid.ColumnModel.dataIndex with multiple sources form a data store.

    Lets say i have the basic fields for a name in a JSON output (Title, Forename, Surename) and i would like to merge all three fields into one column.

    Would the ideal way around this to merge these fields before i output the JSON or is it possible to pass multiple variables to the Ext.grid.ColumnModel.dataIndex?

    Cheers
    Mark


  • You'll be wanting to look at the renderer option in the columnModel.


  • I just realised it isn't documented very well:


    function someRender(value, cell, record)
    {
    return '';
    }


  • Thanks for the heads up evant, i have already been using that for some basic formating - i'll read into it a little bit more but im guessing that it will have full access to the data store values?

    It's taken me a while but im starting to get to grips with this now :) tis good for a XHTML/CSS guy that has said for years that Flash and JS are the devil of the web :D







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about [Help] Ext.grid.ColumnModel Multiple dataIndex Possible? , Please add it free.