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

RadCombobox in RadGrid filtertemplate UI is not proper

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pratik
Top achievements
Rank 1
Pratik asked on 15 Jul 2014, 05:18 AM
Hi i am using Telerik RadGrid control.in which I added FilterTemplate as RadCombobox for providing filter to particular column but That combobox is not looking proper. 
PFA for screenshot of ComBobox.

Code:

<telerik:RadGrid ID="RadGridApplications" Skin="Metro" SkinID="Metro" AutoGenerateColumns="false"
                                OnNeedDataSource="RadGridApplications_NeedDataSource" AllowPaging="true" PageSize="10" 
                                ShowStatusBar="true" AllowFilteringByColumn="true" runat="server">

                    <MasterTableView DataKeyNames="ProductID">
                        <Columns>
                            <telerik:GridBoundColumn DataField="ProductID" HeaderText="Application ID" HeaderStyle-Width="10%" AllowFiltering="false">
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Application Name" HeaderStyle-Width="65%" AllowFiltering="false">
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" HeaderStyle-Width="15%" FilterControlAltText="Status"
                            ReadOnly="true">
                            <FilterTemplate>
                            
                            <telerik:RadComboBox ID="Status_filter" runat="server" Height="200px" Width="100%" 
                                                AppendDataBoundItems="true" OnClientSelectedIndexChanged="selectedindexchanged" 
                                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'>
                            <Items>
                                <telerik:RadComboBoxItem Text="Active" Value="Active"/>
                                <telerik:RadComboBoxItem Text="In-Active" Value="In-Active" ViewStateMode="enabled" />
                            </Items>
                            </telerik:RadComboBox>

                            <telerik:RadScriptBlock ID="radscriptblock1" runat="server">
                            <script type="text/javascript">
                                function selectedindexchanged(sender, args) {
                                    var tableview = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableview.filter("status", args.get_item().get_value(), "equalto");
                                }  
                            </script>
                            </telerik:RadScriptBlock>

                            </FilterTemplate>
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridHyperLinkColumn Text="Edit" ItemStyle-CssClass="editlink" DataNavigateUrlFields="ProductID" HeaderStyle-Width="10%"
                                DataNavigateUrlFormatString="AddEditApplication.aspx?Mode=Edit&ID={0}" AllowFiltering="false">
                            </telerik:GridHyperLinkColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Jul 2014, 08:43 AM
Hello Pratik,

Can you replicate this problem with our live samples?
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx

I'm also sending a sample RadGrid web site demonstrating a similar implementation. Please run the attached application and let me know about the result.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Pratik
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or