This is a migrated thread and some comments may be shown as answers.

GridBoundColumn does not filter on numbers

0 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 20 Apr 2017, 08:44 PM

Hello,

I have the following configuration for a GridBoundColumn where I wont user to filter out values of"0". RadGrid is bound to a DataTable in code-behind, where value comes as integer. This filtering does not seem to work.

 <telerik:GridBoundColumn  DataField="Net"  AllowFiltering="true" HeaderText="Net" UniqueName="Net" FilterControlWidth="30px" Aggregate="None"   ReadOnly="true">
                                                <HeaderStyle Width="35px" />
                                                 <FilterTemplate>
                                                    <telerik:RadComboBox ID="RadComboBoxNet" DataTextField="Net"  
                                                        DataValueField="Net" Height="200px" Width="90px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Net").CurrentFilterValue%>'
                                                        runat="server" OnClientSelectedIndexChanged="NetIndexChanged">
                                                        <Items>
                                                            <telerik:RadComboBoxItem Text="All" />
                                                            <telerik:RadComboBoxItem Text="0" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                                    <telerik:RadScriptBlock ID="RadScriptBlockNet" runat="server">
                                                        <script type="text/javascript">
                                                            function NetIndexChanged(sender, args) {
                                                                var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
                                                                tableView.filter("Net", args.get_item().get_value().trim(), "GreaterThan");
                                                            }
                                                        </script>
                                                    </telerik:RadScriptBlock>
                                                </FilterTemplate>
                                            </telerik:GridBoundColumn>

 

 

Can somebody or support please point to the right direction.

 

Thank you !

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Pavel
Top achievements
Rank 1
Share this question
or