jQWidgets Forums

jQuery UI Widgets Forums Grid Cells format in jqxgrid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Cells format in jqxgrid #54943

    Aj_s
    Participant

    Hi i have a grid in which i want to show date and time in cells.

    See my source you will understood:

    var source = {
    datatype: “observablearray”,
    datafields: [
    { name: ‘EventName’ },
    { name: ‘StartDate’},
    { name: ‘StartTime’},
    { name:’EndDate’},
    { name:’EndTime’},
    { name: ‘EventId’ },
    { name: ‘Contact’ },
    { name: ‘EventVenue’},
    { name: ‘Address’ },
    { name: ‘Status’ }

    ],
    localdata: vm.EventsList

    Their sql data types are >>>for Date i used sql datetime and for Time i used sql time

    So here Date is showing correct where as Time is showing as [object object] …I have tried using cellsformat like:

    { text: ‘Start Time’, dataField: ‘StartTime’, width: 80, columntype: ‘datetimeinput’, cellsformat: ‘HH:mm:ss’ },

    };

    It didnt helped!!, And i changed my data type like:
    { name: ‘StartTime’ ,type:’time’}, it didnt helped either!!!
    My object is like >>>> Object { Ticks=360000000000, Days=0, Hours=10, Minutes=25, more…}

    How to show in correct format? So that when ever i want to edit Time , this time should be displayed in ‘Date Time input ‘ Which is out side of Grid????
    And please try to give reply early before i found my solution, last time Jqwidgets guy suggested solutions after 2 days when i found my own solution

    Cells format in jqxgrid #54946

    Peter Stoev
    Keymaster

    Hi Aj_s,

    As pointed out in the documentation, each datafield should have its “type” member set to “string”, “number”, “bool” or “date”. There is no type: “time” – it should be set to Date. Also Object with the Structure {Ticks=360000000000, Days=0, Hours=10, Minutes=25} would not be considered by jqxGrid as a Date object due to the fact that it is not. To learn about the JavaScript Date Objects, please look at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date. Also, in this Community Forum, an answer should be expected only by your Forum peers, not by our Team.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.