The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
How do you set a default value of a grid dropdown |
Post Reply |
Author | |
jgold
Moderator Group Moderator Joined: December 29 2003 Location: United States Status: Offline Points: 48 |
Post Options
Thanks(0)
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. |
|
Shrek59
Senior Member Joined: December 04 2006 Location: New Zealand Status: Offline Points: 208 |
Post Options
Thanks(0)
|
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
|
|
jgold
Moderator Group Moderator Joined: December 29 2003 Location: United States Status: Offline Points: 48 |
Post Options
Thanks(0)
|
Thanks Brian! I was able to get it working using your advice.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |