I have form called TmpPurchReqTable form and in my form they want me to inactive of Purpose button when My form’s gird is empty.Normally I have a select button and it brings filtered data when I click it,but If I dont click my form’s grid is empty.
How can I can check the grid’s condition to disable a button?
this is my purpose button method:
while select TmpPurchReq where AxsTmpPurchReq.AxsAddProp == NoYes::Yes
{
ret = super();
if(_AxsTmpPurchReq.axsPurchRequestID)
{
button.enabled(true);
ELEMENT.setdata();
}
else
{
button.enabled(false);
}
return ret;
}
I wrote somethingl like that for diasbale the the button ,but of course Its not working
My froms is tmp form and I dont know how to check grid is empty of not.Grid comes with value only I push the se select button and in select button there is code to fill the temp form
could you guys help me please
That property exists in AX 2012. You have tagged your post under AX 2012.
There is no such property in AX 2009, you have to write code.
In active method of the data source,
button.enabled(dataSource.RecId);
I tried it ,my form 's datasource table is temp table.so when I first open its empty if I pusht the select button its getting value by query from another table but they want before pushing the select button they want to dis able to purpose button.cuz if the forms empty its creating empty requestlines they dont want this.so I am trying to diasable the purpose button if the temp table’s form is empty