Hello,
Anyone have any idea on how to disable a button on form when there is no line on the form. If there is line/record on the form then the button will be enabled. Is it possible to do so? Normally, button can be enabled and disabled by checking on the status of the record if the button enabling depends on different records. But how to cater for the above problem where button will enable or disable depends on whether there are line on the form or not.
Thank you
you can check loaded record on datasource like this,
if(yourdatasource_ds.numberOfRowsLoaded() == 0)
{
//disable your button here
}
Thank you cytech.
I manage to do it with another method. However, I have try you method also and it works. By the way, I have a doubt to clarify. Is this a new method apply in Dynamics Ax 2009? I can get this method in Ax 2009 but not in Ax 4.0.