Change Column Color in AX 2012


Description:-

In this article we will see about how to change Column Color in Dynamics AX. We can change dynamically color of column based on condition in grid column. There are displayoption method to create colorable column, cell and row to display color based on condition.

Step 1: Create table from AOT (Application Object Tree) Node.
  1. Expand AOT Node.
  2. Open Data Dictionary Node.
  3. Select Tables and right Click Select New Table.
  4. Name it “A_PO”. 

 Step 2: Insert Field in Created Table Like in Image. 


Step 3: Now Create Form Form Node.
  1. Expand AOT Node.
  2. Select Form Node and Right Click Select New Form and Name it “A_POForm”.
  3. Now Drag and Drop Table in Form DataSource.
  4. Select Design Node Right Click and Select New Controls and Add Grid Controls in Design Node.

Step 4: Now Expand Form DataSource Field Property and Drag All Property in Grid Controls.


Step 5: Now Select DataSource Expand it and Select Method Node. Override Method DisplayOption to Change Column Colour. 


Step 6: Now Code for Column Colour in DisplayOption Method.


Step 7: A_PO is Table and DSPO_PO_ID is DataSource Field So When This Field Found any Data Then Change Colour What We Want to Fill.

Step 8: Now Select Your Created Form and Right Click Select Open Form so Your Form Will open there you can see PO_ID Column Colour Will Change.

Related Posts

Previous
Next Post »

Thanks for comments.....