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

Filter on showing results on postback....

1 Answer 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DuntonMCAD
Top achievements
Rank 1
DuntonMCAD asked on 13 Sep 2010, 03:44 PM
Hi -

I have a basic radGrid that I have wired up with a dataset using the Telerik AjaxManager and RadScriptManger.
 
I used the basic procedure outlined in the Rad Ajax Courseware. It worked the first time, but the second one I just created in not working.

Here's what is happening:

 

  • I enabled filtering on the grid via the SmartTag and PropertyBuilder->General Settings->Allow Filtering By Column.
  • I am using RadGrid.ReBind to initailly bind my grid to the data and this is working fine.
  • At runtime, the gird shows data and I can apply a filter by any column, but when I set the condition like "contains", the gird just disappreas. 
  • However, when I press any button on the form that causes a post back, the Grid then correctly shows the filtered data.

This is only the second grid I have wired up. What might be causing this unwanted behavior?

Any help is appreciated.

PS- I am using v2010.1.209.35

1 Answer, 1 is accepted

Sort by
0
DuntonMCAD
Top achievements
Rank 1
answered on 13 Sep 2010, 03:46 PM
PS - Here's a glimpse of my client side code:

<%

@ Page Title="Structural Configuration Report" Language="C#" MasterPageFile="~/MasterPages/SeaCAPDefault.Master" AutoEventWireup="true" CodeBehind="StructuralConfigurationReport.aspx.cs" Inherits="NAVSEA.SEACAP.WebApp.Reports.StructuralConfigurationReport" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<%

@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 

 

<style type="text/css">

 

.ThePanel

{

background-color: #BBCCEE;

font-family: Arial;

font-size: x-small;

text-align: left;

}

 

.TheCollapsePanel

{

background-color: #BBCCEE;

font-family: Arial;

font-size: small;

text-align: left;

}

 

.TheTextBox

{

font-family: Arial;

font-size: x-small;

text-align: left;

}

 

.style12

{

font-family: Arial, Helvetica, sans-serif;

font-size: small;

}

 

.style14

{

font-size: small;

}

 

 

</style>

 

 

</asp:Content>

 

<

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<table class="ThePanel" width="100%">

 

 

<tr>

 

 

<td style="text-align: left"><span class="style14">View Configuration Data Page

 

 

</span>&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: center">

 

 

<asp:UpdatePanel ID="SearchPanel" runat="server">

 

 

<ContentTemplate>

 

 

<ajax:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server"

 

 

CollapseControlID="SearchTitle" Collapsed="False"

 

 

CollapsedImage="~/images/MaterialLineItems/collapse.jpg"

 

 

CollapsedText="Show Search Toolbar..." Enabled="True"

 

 

ExpandControlID="SearchTitle"

 

 

ExpandedImage="~/images/MaterialLineItems/expand.jpg"

 

 

ExpandedText="Hide Search Toolbar" ScrollContents="False"

 

 

SuppressPostBack="true" TargetControlID="SearchFilterPanel">

 

 

</ajax:CollapsiblePanelExtender>

 

 

<asp:Panel ID="SearchTitle" runat="server" BackColor="#BBCCEE"

 

 

CssClass="TheCollapsePanel" ToolTip="Click to collapse the Search toolbar"

 

 

Width="100%">

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Image ID="Image1" runat="server"

 

 

ImageUrl="~/Images/MaterialLineItems/collapse.jpg" />

 

 

</td>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="Small" Text="Search Toolbar"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

<asp:Panel ID="SearchFilterPanel" runat="server" BackColor="#BBCCEE"

 

 

Font-Names="Arial" Font-Size="Small" Width="100%">

 

 

 

<table width="100%">

 

 

<tr class="style14">

 

 

<td width="200px">

 

Filter

</td>

 

 

<td width="250px">

 

Value

</td>

 

 

<td>

 

 

</tr>

 

 

<tr>

 

 

<td width="200px">

 

 

<asp:Label ID="Label2" runat="server" Text="Model File Name Revision"

 

 

BackColor="White" style="font-size: small" Width="200px"></asp:Label>

 

 

</td>

 

 

<td width="250px">

 

 

<telerik:RadComboBox ID="radComboBoxModelFielName" Runat="server"

 

 

Width="250px" SortCaseSensitive="False">

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="Contains" Value="Contains" />

 

 

<telerik:RadComboBoxItem runat="server" Text="=" Value="=" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;" Value="&lt;" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&gt;" Value="&gt;" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td width="200px">

 

 

<asp:Label ID="Label4" runat="server" Text="Design Zone(DZ)" BackColor="White"

 

 

Width="200px"></asp:Label>

 

 

</td>

 

 

<td width="250px">

 

 

<telerik:RadComboBox ID="radComboBoxDesignZone" Runat="server"

 

 

Width="250px" SortCaseSensitive="False">

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="Contains" Value="Contains" />

 

 

<telerik:RadComboBoxItem runat="server" Text="=" Value="=" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;" Value="&lt;" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&gt;" Value="&gt;" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td width="200px">

 

 

<asp:Label ID="Label5" runat="server" Text="Base A" BackColor="White"

 

 

Width="200px"></asp:Label>

 

 

</td>

 

 

<td width="250px">

 

 

<telerik:RadComboBox ID="radComboBoxBaseA" Runat="server"

 

 

Width="250px" SortCaseSensitive="False">

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="Contains" Value="Contains" />

 

 

<telerik:RadComboBoxItem runat="server" Text="=" Value="=" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;" Value="&lt;" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&gt;" Value="&gt;" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td width="200px">

 

 

<asp:Label ID="Label6" runat="server" Text="Data Source" BackColor="White"

 

 

Width="200px"></asp:Label>

 

 

</td>

 

 

<td width="250px">

 

 

<telerik:RadComboBox ID="radComboBoxDataSource" Runat="server"

 

 

Width="250px" SortCaseSensitive="False">

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="Contains" Value="Contains" />

 

 

<telerik:RadComboBoxItem runat="server" Text="=" Value="=" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;" Value="&lt;" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&gt;" Value="&gt;" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td width="200px">

 

 

<asp:Label ID="Label7" runat="server" Text="Hull" BackColor="White" Width="200px"></asp:Label>

 

 

</td>

 

 

<td width="250px">

 

 

<telerik:RadComboBox ID="radComboBoxHull" Runat="server"

 

 

Width="250px" SortCaseSensitive="False">

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="Contains" Value="Contains" />

 

 

<telerik:RadComboBoxItem runat="server" Text="=" Value="=" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;" Value="&lt;" />

 

 

<telerik:RadComboBoxItem runat="server" Text="&gt;" Value="&gt;" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

<telerik:RadGrid ID="configurationDataRadGrid" runat="server" GridLines="None"

 

 

AutoGenerateColumns="False" AllowFilteringByColumn="True"

 

 

style="text-align: left" ShowStatusBar="True">

 

<

 

HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>

 

 

<ExportSettings OpenInNewWindow="True">

 

 

</ExportSettings>

 

<

 

MasterTableView>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="Model File Name Revision"

 

 

UniqueName="FileName" DataField="FileName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Design Zone(DZ)" UniqueName="DesignZone"

 

 

DataField="DesignZone">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Base A " UniqueName="Basea"

 

 

DataField="Basea">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Data Source" UniqueName="DataSource"

 

 

DataField="DataSource">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Hull"

 

 

UniqueName="Hull" DataField="Hull">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Configuration ID"

 

 

UniqueName="ConfigurationID" DataField="ConfigurationID" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn DataField="ModifiedDate" UniqueName="ModifiedDate">

 

 

</telerik:GridDateTimeColumn>

 

 

</Columns>

 

 

<EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

</

 

MasterTableView>

 

 

</telerik:RadGrid>

 

 

&nbsp;<asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click"

 

 

Text="Apply Filter" Width="125px" />

 

&nbsp;&nbsp;&nbsp;&nbsp;

 

<asp:Button ID="btnClear" runat="server" onclick="btnClear_Click"

 

 

Text="Clear" Width="75px" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<fieldset>

 

 

<legend class="style12">Search Results</legend>

 

 

</fieldset>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

<asp:UpdatePanel ID="MacroEditUpdatePanel" runat="server">

 

 

<ContentTemplate>

 

 

<ajax:CollapsiblePanelExtender ID="ViewCollapsiblePanelExtender"

 

 

runat="server" CollapseControlID="ViewTitle" Collapsed="False"

 

 

CollapsedImage="~/images/MaterialLineItems/collapse.jpg"

 

 

CollapsedText="Show Toolbar..." Enabled="True"

 

 

ExpandControlID="ViewTitle"

 

 

ExpandedImage="~/images/MaterialLineItems/expand.jpg"

 

 

ExpandedText="Hide Toolbar" ScrollContents="False"

 

 

SuppressPostBack="true" TargetControlID="ViewEditPanel">

 

 

</ajax:CollapsiblePanelExtender>

 

 

<asp:Panel ID="ViewTitle" runat="server" BackColor="#BBCCEE"

 

 

CssClass="TheCollapsePanel" ToolTip="Click to collapse toolbar"

 

 

Width="100%">

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Image ID="Image2" runat="server"

 

 

ImageUrl="~/Images/MaterialLineItems/collapse.jpg" />

 

 

</td>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

<asp:Label ID="lblToolbar" runat="server" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="Small" Text="View Toolbar"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

<asp:Panel ID="ViewEditPanel" runat="server" BackColor="#BBCCEE"

 

 

Font-Names="Arial" Font-Size="Small" Width="100%"

 

 

style="text-align: center" BorderStyle="Solid" BorderWidth="1px"

 

 

ForeColor="Black">

 

 

<asp:HyperLink ID="btnExportExcel" runat="server" BorderStyle="Solid"

 

 

Width="75px" BackColor="#CCCCCC" Target="_blank" BorderColor="White">Export</asp:HyperLink>

 

 

</asp:Panel>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: center">

 

 

<asp:TextBox ID="txtRecordCount" runat="server" BorderStyle="Dashed"

 

 

style="text-align: center" Width="250px">[X] of [TOTAL] RECORDS SHOWN</asp:TextBox>

 

 

<br />

 

 

<asp:Label ID="lblReportStatus" runat="server" style="font-size: small"></asp:Label>

 

 

<br />

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="btnSearch">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="txtRecordCount" />

 

 

<telerik:AjaxUpdatedControl ControlID="configurationDataRadGrid" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="configurationDataRadGrid">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="txtRecordCount" />

 

 

<telerik:AjaxUpdatedControl ControlID="configurationDataRadGrid" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

</td>

 

 

</tr>

 

 

</table>

 

</

 

asp:Content>

 

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