Hello, Michael,
 
  I have tried your method for display/hide the control in a grid. I tried it and it worked well.
  I attached my xpo (contains only one form) to show you my working code.
 
  Do you have another condition for the code? Maybe the TmpGrid.id()or  UserSettings.visible or  UserSettings.UserPosition has a wrong value.
 
  Good luck.
 
mbhansen83 <[EMAIL PROTECTED]> wrote:          Hi
 
  I have a problem that I haven't been able to find the answer too
  anywhere.
 
  Basically what I am doing is the following:
 
  I have a form containing a grid. Most of the different customers using
  this form always wants changes to the grid, which is why I decided on
  the solution below.
 
  From this form they can click on a dialog to enable/disable(visible or
  not) the different fields on the grid.
 
  I have now made it so that I build the dialog by running through the
  elements of the grid in run time. I am able to get all the properties
  without any problems. But when they click disable on the dialog and I
  want to get that change effective(runtime) in the grid-element it
  doesn't show/hide the element, even though in the debugger I can see
  it changing before and after. Here's the code:
 
  ------------------------
  Object parentControl, childcontrol;
  ;
  ...
  parentControl = element.form().design().control(TmpGrid.id());
  childControl = parentControl.controlNum(UserSettings.Position);
  childControl.visible(UserSettings.visible);
 
  // I have tried all these but noone of them seem to work:
  element.redraw();
  this.redraw();
  element.refresh();
  ------------------------
 
  I really hope someone can help me with this, because I am almost
  considering going back to the old crappy solution where its not dynamic.
 
  Thanks
  Michael
   
 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

[Non-text portions of this message have been removed]






SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to