Spread Data - Encoded in Chrome

Posted by: wesley.murphree on 6 February 2019, 10:03 am EST

  • Posted 6 February 2019, 10:03 am EST

    FpSpread Version: 11.45.20184.0
    Visual Studio: Professional 2013 Update 5

    We are currently seeing an issue where certain characters (ex. <, >, &) are being auto-encoded in the code-behind only when posting the data from Chrome (v. 71.0.x). We are NOT seeing this issue from IE11.

    I've included screenshots of this issue below and the markup for my spread definition. Hopefully this is an known issue with an easy fix. Thanks!

    IE11 Working


    Chrome NOT working


    FpSpread Markup

    <farpoint:FpSpread id="FpExcel" runat="server" activesheetviewindex="0" bordercolor="#D1D1D2" Visible="true"
    borderstyle="Groove" borderwidth="1px" designstring='<?xml version="1.0" encoding="utf-8"?><Spread />'
    Height="100%" CssClass="FarPointCorrection" Width="100%" rendercssclass="False" EnableAjaxCall="False"
    TabIndex="11"
    ToolTip="Enter the data that applies to this dataset here." >
    <TitleInfo BackColor="#E7EFF7" ForeColor="" HorizontalAlign="Center" VerticalAlign="NotSet"
    Font-Size="X-Large" Font-Bold="False" Font-Italic="False" Font-Overline="False"
    Font-Strikeout="False" Font-Underline="False">
    </TitleInfo>
    <CommandBar Visible="false" >
    <Background BackgroundImageUrl="SPREADCLIENTPATH:/img/cbbg.gif"></Background>
    </CommandBar>
    <Sheets>
    <FarPoint:SheetView SheetName="Sheet1"
    DesignString="<?xml version="1.0" encoding="utf-8"?><Sheet><Data><RowHeader class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="14" columns="1"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>A1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange></RowHeader><ColumnHeader class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="1" columns="12"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>A1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange></ColumnHeader><DataArea class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="14" columns="12"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>R1C1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange><SheetName>Sheet1</SheetName></DataArea><SheetCorner class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="1" columns="1"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>A1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange></SheetCorner><ColumnFooter class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="1" columns="12"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>A1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange></ColumnFooter></Data><Presentation><ActiveSkin class="FarPoint.Web.Spread.SheetSkin"><Name>Colorful1</Name><BackColor>Empty</BackColor><CellBackColor>White</CellBackColor><CellForeColor>#353435</CellForeColor><CellSpacing>0</CellSpacing><GridLines>Both</GridLines><GridLineColor>#D1D1D2</GridLineColor><HeaderBackColor>#878888</HeaderBackColor><HeaderForeColor>#FFFFFF</HeaderForeColor><FlatColumnHeader>True</FlatColumnHeader><FlatRowHeader>True</FlatRowHeader><HeaderFontBold>True</HeaderFontBold><SelectionBackColor>#94549C</SelectionBackColor><SelectionForeColor>#353435</SelectionForeColor><EvenRowBackColor>Empty</EvenRowBackColor><OddRowBackColor>Empty</OddRowBackColor><ShowColumnHeader>True</ShowColumnHeader><ShowRowHeader>True</ShowRowHeader><HeaderGrayAreaColor>Empty</HeaderGrayAreaColor></ActiveSkin><HeaderGrayAreaColor>Empty</HeaderGrayAreaColor><AxisModels><Column class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" defaultSize="100" orientation="Horizontal" count="12"><Items><Item index="-1"><Size>100</Size><SortIndicator>Ascending</SortIndicator></Item></Items></Column><RowHeaderColumn class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" defaultSize="40" orientation="Horizontal" count="1"><Items><Item index="-1"><Size>40</Size><SortIndicator>Ascending</SortIndicator></Item></Items></RowHeaderColumn><ColumnHeaderRow class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" defaultSize="22" orientation="Vertical" count="1"><Items><Item index="-1"><Size>22</Size></Item></Items></ColumnHeaderRow><ColumnFooterRow class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" defaultSize="22" orientation="Vertical" count="1"><Items><Item index="-1"><Size>22</Size></Item></Items></ColumnFooterRow></AxisModels><StyleModels><RowHeader class="FarPoint.Web.Spread.Model.DefaultSheetStyleModel" Rows="14" Columns="1"><AltRowCount>2</AltRowCount><DefaultStyle class="FarPoint.Web.Spread.NamedStyle" Parent="RowHeaderDefault"><BackColor>#878888</BackColor><Font><Bold>True</Bold><Italic>False</Italic><Overline>False</Overline><Strikeout>False</Strikeout><Underline>False</Underline></Font><ForeColor>#FFFFFF</ForeColor></DefaultStyle><ConditionalFormatCollections /></RowHeader><ColumnHeader class="FarPoint.Web.Spread.Model.DefaultSheetStyleModel" Rows="1" Columns="12"><AltRowCount>2</AltRowCount><DefaultStyle class="FarPoint.Web.Spread.NamedStyle" Parent="ColumnHeaderDefault"><BackColor>#878888</BackColor><Font><Bold>True</Bold><Italic>False</Italic><Overline>False</Overline><Strikeout>False</Strikeout><Underline>False</Underline></Font><ForeColor>#FFFFFF</ForeColor><Background class="FarPoint.Web.Spread.Background"></Background></DefaultStyle><ConditionalFormatCollections /></ColumnHeader><DataArea class="FarPoint.Web.Spread.Model.DefaultSheetStyleModel" Rows="14" Columns="12"><AltRowCount>2</AltRowCount><DefaultStyle class="FarPoint.Web.Spread.NamedStyle" Parent="DataAreaDefault"><BackColor>White</BackColor><ForeColor>#353435</ForeColor></DefaultStyle><ConditionalFormatCollections /></DataArea><SheetCorner class="FarPoint.Web.Spread.Model.DefaultSheetStyleModel" Rows="1" Columns="1"><AltRowCount>2</AltRowCount><DefaultStyle class="FarPoint.Web.Spread.NamedStyle" Parent="CornerDefault"><BackColor>#878888</BackColor><Border class="FarPoint.Web.Spread.Border" Size="1" Style="Solid"><Bottom Color="ControlDark" /><Left Size="0" /><Right Color="ControlDark" /><Top Size="0" /></Border><ForeColor>#FFFFFF</ForeColor><Background class="FarPoint.Web.Spread.Background"></Background></DefaultStyle><ConditionalFormatCollections /></SheetCorner><ColumnFooter class="FarPoint.Web.Spread.Model.DefaultSheetStyleModel" Rows="1" Columns="12"><AltRowCount>2</AltRowCount><DefaultStyle class="FarPoint.Web.Spread.NamedStyle" Parent="ColumnFooterDefault"><BackColor>#878888</BackColor><ForeColor>#FFFFFF</ForeColor></DefaultStyle><ConditionalFormatCollections /></ColumnFooter></StyleModels><MessageRowStyle class="FarPoint.Web.Spread.Appearance"><BackColor>LightYellow</BackColor><ForeColor>Red</ForeColor></MessageRowStyle><SheetCornerStyle class="FarPoint.Web.Spread.NamedStyle" Parent="CornerDefault"><BackColor>#878888</BackColor><Border class="FarPoint.Web.Spread.Border" Size="1" Style="Solid"><Bottom Color="ControlDark" /><Left Size="0" /><Right Color="ControlDark" /><Top Size="0" /></Border><ForeColor>#FFFFFF</ForeColor><Background class="FarPoint.Web.Spread.Background"></Background></SheetCornerStyle><AllowLoadOnDemand>false</AllowLoadOnDemand><LoadRowIncrement >10</LoadRowIncrement ><LoadInitRowCount >30</LoadInitRowCount ><TopRow>0</TopRow><PreviewRowStyle class="FarPoint.Web.Spread.PreviewRowInfo" /></Presentation><Settings><Name>Sheet1</Name><Categories><Appearance><SelectionForeColor>#353435</SelectionForeColor><GridLineColor>#D1D1D2</GridLineColor><SelectionBorder class="FarPoint.Web.Spread.Border" /><HeaderGrayAreaColor>Empty</HeaderGrayAreaColor><SelectionBackColor>#94549C</SelectionBackColor><SelectionForeColor>#353435</SelectionForeColor></Appearance><Behavior><SelectionPolicy>Single</SelectionPolicy><PageSize>20</PageSize><AllowInsert>True</AllowInsert><AllowColumnMove>True</AllowColumnMove></Behavior><Layout><RowHeaderColumnCount>1</RowHeaderColumnCount><ColumnCount>12</ColumnCount><ColumnHeaderRowCount>1</ColumnHeaderRowCount><RowCount>14</RowCount><DefaultColumnWidth>100</DefaultColumnWidth></Layout></Categories><ActiveRow>0</ActiveRow><ActiveColumn>0</ActiveColumn><ColumnHeaderRowCount>1</ColumnHeaderRowCount><ColumnHeaderAutoFilterIndex>-1</ColumnHeaderAutoFilterIndex><ColumnFooterRowCount>1</ColumnFooterRowCount><TitleInfo class="FarPoint.Web.Spread.TitleInfo"><Style class="FarPoint.Web.Spread.StyleInfo"><BackColor>#e7eff7</BackColor><HorizontalAlign>Right</HorizontalAlign></Style></TitleInfo><LayoutTemplate class="FarPoint.Web.Spread.LayoutTemplate"><Layout><ColumnCount>4</ColumnCount><RowCount>1</RowCount></Layout><Data><LayoutData class="FarPoint.Web.Spread.Model.DefaultSheetDataModel" rows="1" columns="4"><AutoCalculation>True</AutoCalculation><AutoGenerateColumns>True</AutoGenerateColumns><ReferenceStyle>A1</ReferenceStyle><Iteration>False</Iteration><MaximumIterations>1</MaximumIterations><MaximumChange>0.001</MaximumChange><Cells><Cell row="0" column="0"><Data type="System.Int32">0</Data></Cell><Cell row="0" column="1"><Data type="System.Int32">1</Data></Cell><Cell row="0" column="2"><Data type="System.Int32">2</Data></Cell><Cell row="0" column="3"><Data type="System.Int32">3</Data></Cell></Cells></LayoutData></Data><AxisModels><LayoutColumn class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" orientation="Horizontal" count="4"><Items><Item index="-1"><SortIndicator>Ascending</SortIndicator></Item></Items></LayoutColumn><LayoutRow class="FarPoint.Web.Spread.Model.DefaultSheetAxisModel" orientation="Vertical" count="1"><Items><Item index="-1" /></Items></LayoutRow></AxisModels></LayoutTemplate><LayoutMode>CellLayoutMode</LayoutMode></Settings></Sheet>"
    SelectionBackColor="#94549C" GridLineColor="#878888" SelectionForeColor="#FFFFFF"
    AllowUserFormulas="False" AllowColumnMove="False" AllowInsert="True"
    PageSize="50" SelectionPolicy="Single" DefaultColumnWidth="100" ReferenceStyle="R1C1">
    </FarPoint:SheetView>
    </Sheets>
    <Pager Position="Top" Font-Italic="False" Font-Strikeout="False" Font-Underline="False"
    Font-Overline="False" Font-Bold="False" Mode="Both">
    </Pager>
    <HierBar Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
    Font-Underline="False">
    </HierBar>
    </FarPoint:FpSpread>
  • Replied 6 February 2019, 1:27 pm EST

    UPDATE

    I've narrowed down the error to the FpSpread1.SaveChanges(); method.

    I also put in a simpler markup, example below. This new spread is not experiencing the issue so it must be something I'm doing when defining the control. If I can narrow it down I will let everyone here know what it is.

    Simpler Control

    <FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="#A0A0A0" BorderStyle="Solid" BorderWidth="1px" Height="200" Width="400">
    <CommandBar BackColor="#F6F6F6" ButtonFaceColor="Control"
    ButtonHighlightColor="ControlLightLight" ButtonShadowColor="ControlDark"></CommandBar>
    <Sheets>
    <FarPoint:SheetView SheetName="Sheet1"></FarPoint:SheetView>
    </Sheets>
    </FarPoint:FpSpread>
  • Marked as Answer

    Replied 6 February 2019, 1:49 pm EST

    UPDATE

    I have an answer. So we've been using this control for a while now, back when Chrome really wasn't supported. Due to this we had an "editStopped" event bound to the grid cells which would check the browser and encode characters that were breaking in Chrome.

    The latest version of Spread doesn't suffer from this problem so the solution for us was to remove the encoding logic in the "editStopped" event.
  • Replied 7 February 2019, 8:19 pm EST

    Hello,

    Great to hear that you got your issue resolved.
    I am not sure what code you have used in editStopped event to encode values.
    However Spread also has a EncodeValue property which you may try. This property is used to allow/disallow whether the Spread component encodes the values from the data model and the user's input using the HtmlEncode method.

    Thanks,
    Deepak Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels