Unplanned
Last Updated: 14 Sep 2021 13:19 by ADMIN
Clayton
Created on: 14 Sep 2021 12:37
Category: Grid
Type: Bug Report
1
When filtering for a negative number in a GridNumericColumn with a Numeric Type of "Currency" and AutoPostBackOnFilter="true" filter loses its negative value on Enter keypress

When filtering for a negative number in a GridNumericColumn with a Numeric Type of "Currency" and  AutoPostBackOnFilter="true"  filter loses its negative value on Enter keypress.

Setup to reproduce:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Width="800px" OnNeedDataSource="RadGrid1_NeedDataSource"
    AllowFilteringByColumn="true">
    <MasterTableView AutoGenerateColumns="False">
        <Columns>
            <telerik:GridNumericColumn DataField="Price" DataType="System.Decimal"
                FilterControlAltText="Filter Price column" HeaderText="Price"
                SortExpression="Price" UniqueName="Price" NumericType="Currency" 
                AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo">
            </telerik:GridNumericColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

C#

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    (sender as RadGrid).DataSource = Enumerable.Range(1,6).Select(x=> new { Price = Math.Pow(-1, x) * (x * 0.1 + x * 0.01) });
}
Type a negative value e.g. "-0.11" in the filter control and press Enter. The filter value changes to a positive one and then the filter applies.

 

 

0 comments