Radfilter does not load with the radgrid

0 Answers 33 Views
Filter Grid
khaled
Top achievements
Rank 1
Iron
khaled asked on 22 Nov 2021, 10:18 AM

Can you please tell me why RadFilter  can not load field names from this RadGrid2 if I chang the FilterContainerID to another Radgrid in the page it work fine

<div  style="float:right ; display: flex">    

    <telerik:RadFilter RenderMode="Lightweight" runat="server" ID="RadFilter1" FilterContainerID="RadGrid2" ShowApplyButton="false" ShowAddGroupExpressionButton="False" UseBetweenValidation="False"></telerik:RadFilter>    
</div>   



    <div class="Demo">
             <telerik:RadGrid ID="RadGrid2" 
                 GridLines="None"
                   runat   ="server" 
                  AllowAutomaticDeletes="false"
                   AllowAutomaticInserts="True"
                   AllowPaging="True"
                   AutoGenerateColumns="false" 
                   PageSize="4"
                   CellSpacing="0"
                   OnPreRender ="RadGrid2_PreRender"
                   OnItemCommand  ="RadGrid2_ItemCommand"
                AllowAutomaticUpdates="True"                               
                   AllowMultiRowEdit="true"
                   AllowMultiRowSelection ="true"                                                      
                   DataSourceID ="SqlDataSource3">           
                  <MasterTableView  DataKeyNames="Inv_Id,Id"   
                        CommandItemDisplay="Top"                     
                         AutoGenerateColumns="False"
                        EditMode="InPlace"
                        HorizontalAlign="NotSet"
                        IsFilterItemExpanded="false"
                        RetainExpandStateOnRebind="true"
                       DataSourceID ="SqlDataSource3"
                      >
                       <CommandItemSettings ShowAddNewRecordButton="false" RefreshText="أعادة تنشيط"  RefreshImageUrl="../Images/Green%20Icons/RefreshGreen.png" />


      <CommandItemTemplate>

          <telerik:RadToolBar RenderMode="Lightweight" runat="server" ID="RadToolBar1" AutoPostBack="true">
            <Items>
                <telerik:RadToolBarButton Text="أعادة تنشيط" CommandName="Rebind" ImageUrl="../Images/Green%20Icons/RefreshGreen.png" ImagePosition="Right"></telerik:RadToolBarButton>
              <telerik:RadToolBarButton Text=" تطبيق التصفية" CommandName="FilterRadGrid" ImageUrl="../Images/Filter-List-icon.png" ImagePosition="Right"></telerik:RadToolBarButton>
              <telerik:RadToolBarButton Text="حفظ واختيار الجميع"   CommandName="UpdateEdited" ImageUrl="../Images/appicons/update.png" ImagePosition="left" OnClick="btnUpdateAll_Click"></telerik:RadToolBarButton>

            </Items>
          </telerik:RadToolBar>
        </CommandItemTemplate>

                        <Columns>

                             <telerik:GridTemplateColumn UniqueName="TemplateCheckboxColumn">
                                <HeaderTemplate>                                   
                                    <telerik:RadCheckBox ID="CheckAllCheckBox" runat="server" AutoPostBack="false" OnClientCheckedChanged="checkAllChanged"></telerik:RadCheckBox>
                                </HeaderTemplate>
                                <EditItemTemplate>                                   
                                    <telerik:RadCheckBox ID="RowCheckBox" runat="server" AutoPostBack="false"  Checked='<%# Bind("AnimalStat") %>' ></telerik:RadCheckBox>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>                                                  
                            <telerik:GridBoundColumn SortExpression="inv_Id" HeaderText="التسلسل" HeaderButtonType="TextButton" 
                                DataField="inv_Id" UniqueName="inv_Id" display="false" AllowFiltering ="false">
                            </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn SortExpression="Id" HeaderText="التسلسل" HeaderButtonType="TextButton" 
                                DataField="Id" UniqueName="Id" display="false"   AllowFiltering ="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="AnimalId" HeaderText="رقم الكمبيوتر" HeaderButtonType="TextButton" 
                                DataField="AnimalId" UniqueName="AnimalId" ReadOnly="true" HeaderStyle-Width="150px" AllowFiltering ="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="AnimalNo" HeaderText="رقم الحيوان" HeaderButtonType="TextButton" 
                                        DataField="AnimalNo" UniqueName="AnimalNo" ReadOnly="true" HeaderStyle-Width="150px" AllowFiltering ="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="curr_wight" HeaderStyle-Width="150px" HeaderText=" الوزن الحالي" 
                            UniqueName="curr_wight"  ReadOnly="true" AllowFiltering ="true">
                            </telerik:GridBoundColumn>
                        </Columns>
 </MasterTableView>

                  <ClientSettings AllowKeyboardNavigation="true" >                   
                    <Selecting AllowRowSelect="true"></Selecting>          
            </ClientSettings>

        </telerik:RadGrid>

 

                                               
khaled
Top achievements
Rank 1
commented on 22 Nov 2021, 06:38 PM

i found the problem , it was in the GridTemplateColumn  , I have to add AllowFiltering ="false" to ignor this error

No answers yet. Maybe you can help?

Tags
Filter Grid
Asked by
khaled
Top achievements
Rank 1
Iron
Share this question
or