Wrong date on Multiheader and Hierarchical Grid

Not Answered This post has 0 verified answers | 5 Replies | 2 Followers Thread's RSS feed.

johnny jackson
Points 85
Replied On: Tue, Jan 17 2017 10:22 PM Reply

Hello,

I try to make grid with multiheader column and hierarchical grid. I create multiheader column grid with razor helper and hierarchical grid from controller. But when I show date, it always -1 from data that I send. For example, data source send to browser with value /Date(1456765200000) but it shows as 29 Feb 2016.

If I remove a few lines about multicolumn header in grid, date shows correctly.

It happen when I use either Multicolumn Header Grid or normal grid child in Hierarchical Grid.

Is there any solution?

Thanks.

  • Post Points: 20

All Replies

Ivaylo Hubenov
Points 1,215
Infragistics Employee
Replied On: Wed, Jan 18 2017 12:48 PM Reply

Hello Johnny,

Thank you for contacting Infragistics support!

Please provide me with a sample, since I could not reproduce your issue.

Thanks in advance,
Ivaylo Hubenov
Entry-level developer

  • Post Points: 20
johnny jackson
Points 85
Replied On: Sun, Jan 22 2017 10:09 PM Reply

Hmm thankyou, but I already solved it with adding "enableUTCdates false".

Another problem is when I editing date with datepicker in child of HierarchicalGrid, I set DateInputFormat as "dd/MM/YYYY" and DateDisplayFormat as "dd MMM yyyy" it often lead to false date. For example, new column is empty and I pick 3 Jan 2017. Then it fill as 1 March 2017.

But, if I set DateInputFormat as "date" and DateDisplayFormat as "dd MMM yyyy", it shows the correct date.

Any solutions?

Regards.

  • Post Points: 20
Ivaylo Hubenov
Points 1,215
Infragistics Employee
Replied On: Mon, Jan 23 2017 3:26 AM Reply

Hello Johnny,

Please try setting the format of the date column to "dd MMM yyyy".

I am attaching a sample, where this is done. Please test it and let me know how it went.

Regards,
Ivaylo Hubenov
Entry-level developer

  • Post Points: 20
johnny jackson
Points 85
Replied On: Tue, Jan 24 2017 2:40 AM Reply

Still no luck. Deleting dateDisplayFormat in editor, the result is same. I choose 3 jan 2017 and it become 1 march 2017. I did it in child grid of hierarchical grid.

  • Post Points: 20
Ivaylo Hubenov
Points 1,215
Infragistics Employee
Replied On: Tue, Jan 24 2017 9:36 AM Reply

Hello Johnny,

Did you change the format in the column definition to the necessary one? For example:


columns: [
     { headerText: "Product ID", key: "ProductID", dataType: "number" },
     { headerText: "Product Name", key: "Name", dataType: "string" },
     { headerText: "Product Number", key: "ProductNumber", dataType: "string" },
     { headerText: "Date", key: "Date", dataType: "date", format: "dd MMM yyyy" }
]

If this is done and it still does not work please provide me with a working sample, so I can investigate the issue.

Regards,
Ivaylo Hubenov
Entry-level developer

  • Post Points: 5
Page 1 of 1 (6 items) | RSS