Skip to content

Grid Column Datatypes

New Discussion
Josh
Josh asked on Jan 8, 2019 1:38 PM

What “datatypes” are available for the grid columns?  I see in the documentation examples “string”, “number”, and “date”, but it’s unclear if there are others.

Sign In to post a reply

Replies

  • 0
    [Infragistics] Borislav Traykov
    [Infragistics] Borislav Traykov answered on Jul 6, 2012 1:04 PM
    Hi Josh,

    I’m afraid that the explanation provided at https://www.igniteui.com/help/api/2019.1/ui.iggrid#options is not full enough so let me elaborate.

    The dataType of an igGrid column can be set to any of the following:

    • number
    • string
    • bool (yes, and not boolean – this is important to note)
    • date
    • object
    These types are all native to JavaScript because the igGrid is in its essence a jQuery UI widget.
    “object” is used as a default if the column’s values  are objects (just like the BoxArt column in this igGrid sample).

    Hope this answers your question 🙂
    If it doesn’t, please let me know what’s puzzling you.

    Cheers,
    Borislav

    • 0
      Josh
      Josh answered on Jul 6, 2012 3:17 PM

      Thanks Borislav.  I had a suspicion they might be js native types.  This makes sense.

      • 0
        [Infragistics] Borislav Traykov
        [Infragistics] Borislav Traykov answered on Jul 7, 2012 2:25 PM

        No prob, Josh.

        Just to note that these data types apply to the igGrid when it's being used in MVC scenarios as well. 

      • 0
        Alexander Todorov
        Alexander Todorov answered on Jul 9, 2012 12:20 PM

        The data types that can be used for columns in an MVC environment are basically part of the native .NET types – they aren't related to the JavaScript types. How they are "translated" to javascript data types, when scripts and markup is generated, is something the grid maps.

        Angel

      • 0
        Josh
        Josh answered on Jul 9, 2012 9:51 PM

        Good to know, thanks.

      • 0
        Manjunath Murgod
        Manjunath Murgod answered on May 9, 2014 10:22 PM

        Hi Angel,

        Document says that dataType values should be one of bool, date, string or number. I wanna right an generic code in our app to get .Net native types for a column type and set it's value to dataType field, will that work or not?

        Looks like it does work but I'm afraid to use it as it's not documented.

        Thanks,

        Manjunath M

    • 0
      Logan Laux
      Logan Laux answered on Jan 8, 2019 1:38 PM

      I know this is an old post, but is there a way I can keep my leading 0's and remove the comma from the "number" dataType?

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Josh
Favorites
0
Replies
7
Created On
Jan 08, 2019
Last Post
7 years, 1 month ago

Suggested Discussions

Tags

Created by

Created on

Jan 8, 2019 1:38 PM

Last activity on

Feb 19, 2026 9:16 AM