External objects
(e.g. Flash and SilverLight)

TreeGrid documentation

TreeGrid can display any external object in any cell.
To display the object create and place this object in OnRenderRow event.
Because some external objects need to refresh after its parent tag is moved, re-displayed or scrolled, catch the other events to do the needed action.
It is strongly recommended to not use 'Class' cursor for the external object cells, set CellFocus='Border,Color' for the column or cell.
chg 13.0 API event void

OnRenderRow

(TGrid grid, TRow row, string col)
Called whenever the row or its cell is being rendered or refreshed. Since 13.0 it is called also for fixed and space rows.
Use this event to create or update some custom HTML code in the row cells, for example when using dynamic objects via plugins like Flash, SilverLight, external JavaScript charts and so on.
Use the GetCell method to get the cell object. Do not expect the exact cell structure, always search for your custom tags like "object".
col is set to column name when only this cell is being refreshed, otherwise is set to null and you need to update all your custom cells in the row.
Remember, the cell is refreshed also if used Class type focus or hover cursor (by default is for Focus, to disable it set CellFocus='Border,Color')
new 13.0 API event void

OnClearRow

(TGrid grid, TRow row, string col)
Called whenever the row or its cell is being rendered or refreshed, before the content is cleared.
Use this event to dispose custom data assigned to the HTML code in the row cells.
Use the GetCell method to get the cell object. Do not expect the exact cell structure, always search for your custom tags like "object".
col is set to column name when only this cell is being refreshed, otherwise is set to null and you need to update all your custom cells in the row.
Remember, the cell is refreshed also if used Class type focus or hover cursor (by default is for Focus, to disable it set CellFocus='Border,Color')
API event void

OnDisplaceRow

(TGrid grid, TRow row, string col)
Called when the row or its cell has been physically moved inside HTML table.
When row is moved, this event is called also for every row's rendered child, only for expanded parents.
Use this event to update some external objects like dynamic Flash or SilverLight that need to be updated when their parent is moved by DOM.
col is set to column name when only this cell is being moved (when moving column), otherwise is set to null and you need to update all your custom cells in the row.
API event void

OnDisplayRow

(TGrid grid, TRow row)
Called when the row has been displayed => changed its state from display:none.
Called when the row is shown, but it is not re-rendered. Usually when the row is shown due filtering or by parent row expand.
Use this event to update some external objects like dynamic Flash or SilverLight that need to be updated when their parent state is changed from display:none.
API event void

OnScrollRow

(TGrid grid, TRow row)
Called when the row is scrolled into visible area.
Use this event to update some problematic external object like dynamic Flash in Firefox that cannot be displayed into invisible area due overflow.
API event void

OnScrollCol

(TGrid grid, string col)
Called when the column is scrolled into visible area.
Use this event to update some problematic external object like dynamic Flash in Firefox that cannot be displayed into invisible area due overflow.
new 6.0 <Cfg> bool

ExactSize

[1]
If the size of grid is computed according to the real main tag size.
For 1 it preserves also percentage width inside tables and similar layouts.
Set it to 0 for large tables when grid becomes slow when updating layout.
If used external objects like Flash or SilverLight in grid cells, it should be set to 0.