Print Page | Close Window

How do you set a default value of a grid dropdown

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: GUI Development
Forum Description: Help for developers creating GUI applications with AccuTerm
URL: https://forum.asent.com/forum_posts.asp?TID=2708
Printed Date: March 28 2024 at 4:01am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: How do you set a default value of a grid dropdown
Posted By: jgold
Subject: How do you set a default value of a grid dropdown
Date 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.



Replies:
Posted By: Shrek59
Date 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


Posted By: jgold
Date Posted: March 06 2019 at 2:20pm
Thanks Brian! I was able to get it working using your advice.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net