Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ken_schwartz  
#1 Posted : Friday, January 18, 2019 3:21:27 PM(UTC)
ken_schwartz

Rank: Newbie

Groups: Registered
Joined: 12/14/2018(UTC)
Posts: 4

I've been able to display the grid and add data with some basic functionality. However, I'm stuck on sorting a date column. The dates I'm supplying are in CCYYMMDD format. I want the grid to display the dates in MM/DD/CCYY or MM/DD/YY format while retaining a correct sort. Has anyone successfully implemented this grid using a COBOL program? I would be most grateful for coding samples.
Igor/10Tec  
#2 Posted : Friday, January 18, 2019 4:01:08 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,053

Thanks: 14 times
Was thanked: 137 time(s) in 137 post(s)
Ken, did you try the CellDynamicText event we suggested in our email correspondence? Does it work in COBOL?
ken_schwartz  
#3 Posted : Monday, January 21, 2019 3:56:57 PM(UTC)
ken_schwartz

Rank: Newbie

Groups: Registered
Joined: 12/14/2018(UTC)
Posts: 4

I did, but without success. I am able to respond to events like a mouse click, and I see various events fire as the grid is created, but I don't see the CellDynamicText event.
Igor/10Tec  
#4 Posted : Tuesday, January 22, 2019 8:13:09 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,053

Thanks: 14 times
Was thanked: 137 time(s) in 137 post(s)
You should manually enable this event. Here is the corresponding excerpt from the documentation:

Quote:
Important: enabling this event

This event may be raised many times per second during drawing operations, etc. To provide the best performance, iGrid does not raise this event by default. To enable it, specify the igDCEventCellDynamicText flag in the DynamicContentEvents property.
ken_schwartz  
#5 Posted : Tuesday, January 22, 2019 11:01:48 PM(UTC)
ken_schwartz

Rank: Newbie

Groups: Registered
Joined: 12/14/2018(UTC)
Posts: 4

I've enabled the event so that it does fire. However, I am unable to effect any change to the data. Perhaps it's a timing issue? The event does not fire until after data has been loaded into the grid.
ken_schwartz  
#6 Posted : Thursday, January 24, 2019 2:43:18 PM(UTC)
ken_schwartz

Rank: Newbie

Groups: Registered
Joined: 12/14/2018(UTC)
Posts: 4

I got this to work by providing a date cell value in this format: YYYY-MM-DD

MODIFY TENTECH-1 @CellValue(ROW-COUNT,3,INPUT-DATE)

Then I use the @CellFmtString property with this format: MM/dd/yyyy

MODIFY TENTECH-1 @CellFmtString(ROW-COUNT,3,"MM/dd/yyyy")

This displays and sorts the date correctly.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.