Status of a Grid Column : Enabled/Disabled

OmmSai99

Member
Hello All,

Is there any standard function to check the status of a Grid column If its enabled or disabled at a certain position.

I mean , there are multiple validations in different event rule where a grid column has been enabled or disabled. i need to know if the Grid column is enabled or disabled at a certain moment/position , based on which i can write some more logic.

My New Requirement is
IF Grid Column is enabled
---DO this---
Else
---DO this---
End IF




Thanks
 
Hi, AFAIK this is not possible. But there is definitely some condition based on which grid column is enabled/disabled. You can use the same condition for your new ER.

So, if flag = Y,
disable grid column
---DO this---
else
---DO this---
End If
 
Thank you For your reply.

Yes i am doing the same , but the difficulties is , there are so many permutations and combinations of these conditions where this Grid column is enabled/disabled and its getting more difficult to replicate all these permutations and combinations of these conditions .

so was checking for other alternatives.


Thanks
 
If I understand your requirement, you might try modularizing all of your Grid Column enables and disables. Something like creating a hidden button for each of DisableColumn and EnableColumn. In the ER for each of those events, you set a global variable based on if enabling or disabling:

DisableColumn button pressed:
Code:
VA frm_GridColEnabled = "N"
DisableGridColumn system function

EnableColumn button pressed:
Code:
VA frm_GridColEnabled = "Y"
EnableGridColumn system function

You will need to replace all of the existing code where your column is being enabled and disabled to call the appropriate button code, and as long as you use that approach everywhere that column's enabled-state changes, you will have the one variable to which you can refer to check it's enabled-state.

There is no system function you can call that will just return that enabled-state to you programmatically.
 
Edit:
Got to second page of responses and realized JMR had all ready basically given the same resolution. Sorry for not reading the entire thread before responding, deleting my response.
 
Last edited:
Thank You Jeremy and Brian

My requirement is to perform some logic if the Grid column A ( Say) is disabled and perform some different logic If the Grid column A ( Say) is enabled.
that means at a certain moment ( Click a Row exit after selecting a Row ) i need to know the column A of the selected Row is enabled or disabled.


To Replace the exiting code or replicate the Exiting condition is very complex , as there are huge amount of logic written with lots of permutation and combination of conditions where the Column A is enabled/disabled. so its not possible to find exactly what are the conditions where the column A is enabled and where the column is disabled.

So looking for any alternative (Logic or Functions ) where to pass the selected row column and check the status ,its enabled or disabled.


Thanks
 
Yeah, you kind of have to start with the plan Jeremy outlined. Its a unfortunate that there isn't a way to read control state. I have ran into the same requirement on more than one occasion.
 
You don't have to replace/replicate the existing logic that determines the state. You would replace every DisableGrid<Column A> and every EnableGrid<Column A> system function calls with corresponding PressButton<DisableGrid> and PressButton<EnableGrid>. As long as you do that, the value of that global variable (VA frm_GridColumnEnabled for instance) can be checked anywhere in your code to "know" if the column is enabled or not.
 
Back
Top