> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# OnRender()

## Definition

Used to draw custom content to the SuperDOM Column, such as a Grid.

This method is called during the following conditions:

* The SuperDOM is centered (either automatically or when the user presses the Center button)
* The SuperDOM is scrolled
* All accounts are disconnected
* A simulation account is reset
* A position is updated
* The user changes the SuperDOM's properties through the Properties menu
* The SuperDOM first loads (e.g. restoring from a workspace)
* The user changes the PnL display unit by clicking on the Position display
* The height/width of the SuperDOM window changes
* A user resizes the content area by dragging the splitter between price ladder and the columns

While similar to a Chart Indicator's [OnRender()](/developer/desktop-sdk/references/common/charts/rendering/onrender) method, the SuperDOM Column uses [WPF Drawing Context](https://msdn.microsoft.com/en-us/library/system.windows.media.drawingcontext\(v=vs.110\).aspx) class, rather than the SharpDX library used for [chart rendering](/developer/desktop-sdk/references/common/charts/rendering).  Concepts between these two methods are guaranteed to be different.

## Method Return Value

This method does not return a value.

## Syntax

You must override the method in your SuperDOM column with the following syntax:

`protected override void OnRender(DrawingContext dc, double renderWidth) \{ \}`

## Parameters

| Parameter   | Description                        |
| ----------- | ---------------------------------- |
| dc          | The drawing context for the column |
| renderWidth | The rendering width for the column |

In order to force OnRender() to be called under a specific condition, call the OnPropertyChanged() method which will force the entire column to repaint.  This approach should be used instead of calling OnRender() directly.

## Examples

```csharp
protected override void OnRender(DrawingContext dc, double renderWidth)
{
  // Rendering logic for our column
}
```