Ext.NET
Ext.NET copied to clipboard
absent: ext-column's Renderer inner property
The ext-column component ignores a Renderer inner property. Whilst it does not prevent the page from rendering at all, the renderer code won't get rendered to the component (as if it weren't specified).
Issue explored at gridpanel/arraygrid/simple/index.cshtml#L91.
Examples referencing the feature
WebForms examples matching <ext:Column and <Renderer
- Because the renderer is usually defined in another line, some examples may contain
<Rendererreferences to parts of the code not within theext:Columnblocks.
- Action > Basic > Grid
- Associations > HasMany > Lazy_Load
- Chart > Area > Basic
- Chart > Column > Stacked
- Chart > Column > Stacked_100
- Chart > Combination > Pareto
- Chart > Misc > ToolTips
- ColorPicker > Advanced > GridPanel
- Combination_Samples > Applications > Feed_Viewer
- Combination_Samples > Applications > Word_Wrench
- Data_Binding > Basic > Chaining_Stores
- Data_Binding > Basic > Isolated_Child_Sessions
- Desktop > Introduction > Overview
- DragDrop > Grid > Field_to_Grid
- Form > DropDownField > Overview
- Form > FormPanel > Basic
- Form > Triggers > Trigger_with_Dialog_Editor
- Getting_Started > Introduction > Component_Overview
- GridPanel > ArrayGrid > ArrayWithPaging
- GridPanel > ArrayGrid > ForceFit
- GridPanel > ArrayGrid > Keep_Page_on_Refresh
- GridPanel > ArrayGrid > PageProxy_with_DirectMethod
- GridPanel > ArrayGrid > Remote_Load
- GridPanel > ArrayGrid > Simple
- GridPanel > ColumnModel > Change_Models
- GridPanel > ColumnModel > Reconfigure
- GridPanel > Commands > Cell_Command
- GridPanel > Commands > Prepare_Commands
- GridPanel > ComponentColumn > Overview
- GridPanel > DataSource_Controls > LinqDataSource
- GridPanel > DataSource_Controls > ObjectDataSource
- GridPanel > DataSource_Controls > SqlDataSource
- GridPanel > Data_Presentation > Editor_Field_Mapping
- GridPanel > Data_Presentation > Field_Mapping
- GridPanel > Data_Presentation > MultiCombo_Map
- GridPanel > Editable > Editor_with_DirectMethod
- GridPanel > FilterHeader > Mapped_Field_Filtering
- GridPanel > FilterHeader > Overview
- GridPanel > FilterHeader > Remote
- GridPanel > Layout > FitLayout
- GridPanel > Locking_Grid > Cell_Editing
- GridPanel > Locking_Grid > GroupingSummary
- GridPanel > Locking_Grid > GroupingSummary_with_group_headers
- GridPanel > Locking_Grid > Simple
- GridPanel > Miscellaneous > ColumnHeaderGroup
- GridPanel > Miscellaneous > Custom_Column
- GridPanel > Miscellaneous > Custom_Data_Binding
- GridPanel > Miscellaneous > Custom_UI
- GridPanel > Miscellaneous > Details_Window
- GridPanel > Miscellaneous > Details_Window_Remote
- GridPanel > Miscellaneous > Export_Data_Ajax
- GridPanel > Miscellaneous > Export_Data_PostBack
- GridPanel > Miscellaneous > FilterQuery
- GridPanel > Miscellaneous > Generic_List
- GridPanel > Miscellaneous > Grouping
- GridPanel > Miscellaneous > Grouping_TotalRow
- GridPanel > Miscellaneous > JSONP_Proxy
- GridPanel > Miscellaneous > Numbered_Rows
- GridPanel > Miscellaneous > Save_Filter
- GridPanel > MultiHeader > Filter
- GridPanel > Paging_and_Sorting > DirectMethod
- GridPanel > Paging_and_Sorting > Multiple_Sorting_Local
- GridPanel > Paging_and_Sorting > Page
- GridPanel > Plugins > GridFilters_Local
- GridPanel > Plugins > GridFilters_Remote
- GridPanel > Plugins > GroupingSummary
- GridPanel > Plugins > GroupPaging
- GridPanel > Plugins > LiveSearch
- GridPanel > Plugins > Remote_GroupSummary
- GridPanel > Plugins > Selection_Memory
- GridPanel > Plugins > SlidingPager
- GridPanel > Plugins > Summary
- GridPanel > Restful > Overview
- GridPanel > RowExpander > Local_Mode
- GridPanel > RowExpander > Remote_Mode
- GridPanel > RowExpander > Shared_Component
- GridPanel > Selection_Models > Cell_Selection
- GridPanel > Selection_Models > Checkbox_Selection
- GridPanel > Selection_Models > Row_Selection
- GridPanel > Selection_Models > Submitting_Values
- GridPanel > Spreadsheet > Clipboard
- GridPanel > System.Data > DataTable
- GridPanel > Update > AutoSave
- GridPanel > Update > Batch
- Keys > Panel_Keys > Grid_Rows_Delete
- Kitchen_Sink > GridPanels > Grouped_Header_GridPanel
- MessageBox > Callout > Delegation
- Miscellaneous > Mouse_Distance_Sensor > Basic
- Miscellaneous > Store > ClientStore
- Miscellaneous > ToolTips > GridPanel_Cell_Tooltip
- Miscellaneous > ToolTips > GridPanel_Row_Tooltip
- TreePanel > Advanced > Buffer_Rendered_TreeGrid
- TreePanel > Advanced > Locking_Buffer_Rendered_TreeGrid
MVC examples matching \.Column\(.*\.Renderer\(
(renderers necessarily pertaining the column)
- Actions > Grid
- Data > Basic > ModelSerializer
- DragDrop > Grid > Field_to_Grid
- Form > FormPanel > Basic
- GridPanel > ArrayGrid > ArrayWithPaging
- GridPanel > ArrayGrid > Remote_Load
- GridPanel > ArrayGrid > Simple
- GridPanel > ColumnModel > Ajax_Configuration
- GridPanel > FilterHeader > Overview
- GridPanel > Miscellaneous > FilterQuery
- GridPanel > Plugins > GridFilters_Local
- GridPanel > Plugins > GridFilters_Remote
- GridPanel > RowExpander > Component
- GridPanel > RowExpander > Local_Mode
- GridPanel > RowExpander > Remote_Mode
- Miscellaneous > Mouse_Distance_Sensor > Basic
- Miscellaneous > Store > ClientStore
The renderer property is available as an <ext-column /> element attribute.
Actual
<Columns>
<ext-column Text="Company" DataIndex="company" Flex="1" />
<ext-column Text="Price" DataIndex="price">
<Renderer Format="UsMoney" />
</ext-column>
<ext-column Text="Change" DataIndex="change">
<Renderer Fn="change" />
</ext-column>
<ext-column Text="Change" DataIndex="pctChange">
<Renderer Fn="pctChange" />
</ext-column>
<ext-datecolumn Text="Last Updated" DataIndex="lastChange" Width="120" />
</Columns>
Revised
<Columns>
<ext-column Text="Company" DataIndex="company" Flex="1" />
<ext-column Text="Price" DataIndex="price" renderer="Ext.util.Format.usMoney" />
<ext-column Text="Change" DataIndex="change" renderer="change" />
<ext-column Text="Change" DataIndex="pctChange" renderer="pctChange" />
<ext-datecolumn Text="Last Updated" DataIndex="lastChange" Width="120" />
</Columns>
For the record, scenarios like this:
<Columns>
<ext:Column
runat="server"
Flex="1"
Editor="true"
DataIndex="Value">
<Renderer Handler="metadata.style='color:gray;'; return '[none]';" />
</ext:Column>
</Columns>
Will have to be expressed as:
<columns>
<ext-column
flex="1"
editor="true"
dataIndex="Value"
renderer="function (value, metadata, record, rowIndex, colIndex, store, view) { metadata.style='color:gray;'; return '[none]'; }"
/>
</columns>
In other words, the function arguments will have to be expressed all the time. Although similar to declaring the function itself, it means there's no longer a shorthand for that as Ext.NET 5's <Renderer Handler="..." /> did.
Basically there are five different argument sets to renderer throughout Ext.NET at least as far as WebForms Examples Explorer uses of Renderer within:
ext:*Axis:axis, label, layoutContext, lastLabelext:*Column:alue, metadata, record, rowIndex, colIndex, store, viewext:*Series:sprite, config, rendererData, indexLabel:text, sprite, config, rendererData, indexTooltip:toolTip, record, context
Using an inner <renderer> with the fn attribute would be preferred, although this does not appear to be currently supported.
<ext-column
flex="1"
editor="true"
dataIndex="Value">
<renderer fn="function (value, metadata, record, rowIndex, colIndex, store, view) { metadata.style='color:gray;'; return '[none]'; }" />
</ext-column>