Hello,
I'm triying to implement a filter control besides a rad grid control. However i have had some problems with its visualization. I have followed the recommendations about the controls nevertheless the filter control doesn't display. I have reviewed the filter code and the datasource as well.
Any Suggestion??
Best Wishes,
William
I'm triying to implement a filter control besides a rad grid control. However i have had some problems with its visualization. I have followed the recommendations about the controls nevertheless the filter control doesn't display. I have reviewed the filter code and the datasource as well.
Any Suggestion??
<telerik:RadAjaxManager id="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="grid" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="grid" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> <telerik:RadGrid runat="server" ID="grid" AutoGenerateColumns="False" AllowPaging="True" OnNeedDataSource="grid_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand" OnItemCommand="RadGrid1_ItemCommand" onpageindexchanged="grid_PageIndexChanged" OnItemDataBound="RadGrid1_ItemDataBound" FilterItemStyle-Wrap="true" Culture="es-CO" GridLines="None" > <MasterTableView DataKeyNames="" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="EditForms"> <Columns> <telerik:GridBoundColumn UniqueName="id" DataField="id" HeaderText="Id" ForceExtractValue="InEditMode" ConvertEmptyStringToNull="true" Visible="false" > </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="Sociedad" DataField="Sociedad" HeaderText="Sociedad" ForceExtractValue="InEditMode" ConvertEmptyStringToNull="true" > <EditItemTemplate> <asp:DropDownList CssClass="dropdownlist" ID="ddlContainerSociedad" runat="server"></asp:DropDownList> <asp:Label ID="LabelCompanyID" runat="server" Text='<%#Eval("CompanyID") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="LabelCompanyID" runat="server" Text='<%#Eval("CompanyID") %>'></asp:Label> </ItemTemplate> <FilterTemplate> <telerik:RadComboBox ID="cbFSociedad" runat="server" DataSourceID="SqlDataSource1" DataTextField="CompanyID" DataValueField="CompanyID" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Sociedad").CurrentFilterValue %>' OnClientSelectedIndexChanged="TitleIndexChanged" > <Items> <telerik:RadComboBoxItem Text="Todas" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function TitleIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("Sociedad", args.get_item().get_value(), "Contains"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridTemplateColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" /> </Columns> </MasterTableView> <PagerStyle Mode="NextPrevAndNumeric" /></telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PanalpinaEntities %>" SelectCommand="SELECT distinct [CompanyID] FROM [Panalpina].[dbo].[SAPCenterCostBranch]order by [CompanyID] " ProviderName="System.Data.SqlClient"> </asp:SqlDataSource>Best Wishes,
William
