Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - How do you set a default value of a grid dropdown
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedHow do you set a default value of a grid dropdown

 Post Reply Post Reply
Author
Message
jgold View Drop Down
Moderator Group
Moderator Group

Moderator

Joined: December 29 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote jgold Quote  Post ReplyReply Direct Link To This Post Topic: How do you set a default value of a grid dropdown
    Posted: February 28 2019 at 11:49am
Hi,

I'm trying to use the AccuTerm GUI for a program. I've got a grid control and one of the fields has a dropdown list. When I start a new row I want to set a default value to the dropdown list column. Is there any way to do that?

I've looked for a default dropdown property but didn't find one. I thought that maybe I could manually load the property when a new row is added. There doesn't seem to be an event fired when a new row is started.

Any help would be appreciated.
Back to Top
Shrek59 View Drop Down
Senior Member
Senior Member


Joined: December 04 2006
Location: New Zealand
Status: Offline
Points: 208
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shrek59 Quote  Post ReplyReply Direct Link To This Post Posted: February 28 2019 at 7:03pm
Hi,

Well, there is a GPDEFVAL property which sets the default value of the control. What this means in the context of a grid is somewhat uncertain, as the "value" of the control is the whole grid. Maybe you could use this property with the ATSETPROP subroutine, with a non-zero column value to set the default value of drop-down column (cell).

My approach would be to activate the GEACTIVATEROW event. In the event handler, check whether the activated row is a new row, and if so, set default cell values.

HTH,

Brian
Back to Top
jgold View Drop Down
Moderator Group
Moderator Group

Moderator

Joined: December 29 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote jgold Quote  Post ReplyReply Direct Link To This Post Posted: March 06 2019 at 2:20pm
Thanks Brian! I was able to get it working using your advice.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.