The radgrid table is disappears when choosing a value for any filter on radgrid

0 Answers 61 Views
Ajax AjaxLoadingPanel AjaxPanel Filter Grid
Top achievements
Rank 1
Rafi asked on 23 May 2023, 05:27 AM

Please help me to search the error ,

the radgrid table disappear after filtering the search, 
I tried to find any solution a lot but i did not find a solution for this problem


aspx code :
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
                                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid3" />
                                                    <telerik:AjaxUpdatedControl ControlID="RadGrid4" />

                            <telerik:RadGrid EnableAriaSupport="true" ID="RadGrid1" runat="server" AllowPaging="true" AllowSorting="true" PageSize="20" ShowStatusBar="true"
                                 CellSpacing="0" GridLines="None" ClientSettings-EnablePostBackOnRowClick="false" AllowFilteringByColumn="True">
                                <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" DataKeyNames="REQ_ID" >
                                    <HeaderStyle HorizontalAlign="Center" ForeColor="#009900" Font-Names="Arial" Font-Bold="true" Font-Size="Medium" Height="50px"/>
                                        <telerik:GridMaskedColumn DataField="REQ_ID" HeaderText="رقم الطلب" UniqueName="Req_num_r1" Visible="true" AllowFiltering="false">
                                        <telerik:GridBoundColumn DataField="EMP_NAME" HeaderText="اسم الموظف/ طالب الخدمة" AllowFiltering="true"  UniqueName="EMP_NAME_ra" Visible="true" HeaderStyle-Width="15%">
                                        <telerik:GridBoundColumn DataField="NAME" HeaderText="الخدمة المقدمة" UniqueName="Problem_Name_r1" Visible="true" ColumnGroupName="GeneralInformation">
                                                <telerik:RadComboBox RenderMode="Lightweight" ID="Problem_NameCombo1" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Problem_Name_r1").CurrentFilterValue %>'
                                                    runat="server" OnClientSelectedIndexChanged="Problem_NameComboIndexChanged1" AutoPostBack="true">
                                                        <telerik:RadComboBoxItem Text="All" Value="" />
                                                        <telerik:RadComboBoxItem Text="مشكلة في الطباعة" Value="مشكلة في الطباعة" />
                                                        <telerik:RadComboBoxItem Text="سكانر" Value="سكانر" />
                                                        <telerik:RadComboBoxItem Text="مشكلة في الشبكة" Value="مشكلة في الشبكة" />
                                                        <telerik:RadComboBoxItem Text="البريد الحكومي" Value="البريد الحكومي" />
                                                        <telerik:RadComboBoxItem Text="الارشيف" Value="الارشيف" />
                                                        <telerik:RadComboBoxItem Text="موارد" Value="موارد" />
                                                        <telerik:RadComboBoxItem Text="الانترنت" Value="الانترنت" />
                                                        <telerik:RadComboBoxItem Text="جهاز الحاسوب" Value="جهاز الحاسوب" />
                                                        <telerik:RadComboBoxItem Text="حزمة الاوفيس" Value="حزمة الاوفيس" />
                                                        <telerik:RadComboBoxItem Text="موقع الديوان" Value="موقع الديوان" />
                                                <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                                    <script type="text/javascript">
                                                        function Problem_NameComboIndexChanged1(sender, args) {
                                                            var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                            tableView.filter("Problem_Name_r1", args.get_item().get_value(), "EqualTo");
                                        <telerik:GridDateTimeColumn DataField="CREATE_DATE" ItemStyle-CssClass="sm-visible" HeaderText="وقت انشاء الطلب" DataFormatString="{0:g}" UniqueName="Create_date_r1">
                                        <telerik:GridBoundColumn DataField="provider" HeaderText="مقدم الخدمة" UniqueName="provider_r1" HeaderStyle-Width="20%">
                                        <telerik:GridDateTimeColumn DataField="END_DATE" HeaderText="وقت تنفيذ الطلب" DataFormatString="{0:g}" UniqueName="END_DATE_r1" Visible="true">
                                        <telerik:GridMaskedColumn DataField="Responsiveness" HeaderText="سرعة الانجاز" UniqueName="Responsiveness_r1" AllowFiltering="false">



                                        <div class="Table" style="background-color: #a7d1e2">

                                            <div class="TableRow col-12">
                                                <div class="TableCell p-3" style="inline-size: 100%; overflow-wrap: break-word;"><b class="text-danger">تفاصيل المشكلة : </b><%# Eval("DESCRIPTION") %> </div>
                                                <div class="TableCell p-2" style="inline-size: 100%; overflow-wrap: break-word;"><b class="text-danger">ملاحظات مقدم الخدمة : </b><%# Eval("NOTE") %> </div>
                                                <div class="TableCell p-2">
                                                    <b class="text-danger">تقييم الخدمة  : 
                                                          <div class="progress-bar" role="progressbar" style="width:100px ;" aria-valuenow='<%# Convert.ToDouble(Eval("FEEDBACK_RATING"))*20 %>' aria-valuemin="0" aria-valuemax="100"><%# Convert.ToDouble(Eval("FEEDBACK_RATING"))*20 %> %</div>




                                    <DataBinding SelectMethod="GetDataAndCount">

Telerik team
commented on 25 May 2023, 02:51 PM

Hi Rafi,

Based on the provided code, there are a few reasons why the grid may disappear after filtering. Here are some suggestions to help you troubleshoot the issue:

  • Check for JavaScript errors: Inspect the browser console for any JavaScript errors that might be occurring when the filter is applied. Fixing these errors could resolve the issue.
  • Disable the AJAX to check for more detailed client errors: Disable the AJAX and test again to see if the issue is not caused by the ajaxification of the grid. See this article for more information: Get more descriptive errors by disabling AJAX.
  • Verify the Ajax settings: Ensure that the RadGrid and other related controls (RadGrid2, RadGrid3, RadGrid4) are properly registered in the RadAjaxManager settings. Make sure the AjaxControlID property of the AjaxSetting is set to the correct control ID of the RadGrid. Also, check if the UpdatedControls section includes all the necessary controls that should be updated after filtering.
  • Verify the RadGrid data source: Make sure that the data source for the RadGrid is properly configured and bound. Check the SelectMethod specified in the DataBinding section of the ClientSettings to ensure it returns the correct data.
  • Check the filter functionality: Review the JavaScript function Problem_NameComboIndexChanged1 that is triggered when the RadComboBox's selected index is changed. Ensure that it is correctly filtering the RadGrid based on the selected value. You can debug this function using browser developer tools and console.log statements to check if the correct filter value is passed to the RadGrid.
  • CSS or styling issues: It's possible that the filtered table is not visible due to CSS or styling conflicts. Verify if there are any CSS rules that might be affecting the visibility of the RadGrid or its elements. Inspect the HTML structure and CSS classes using browser developer tools to see if any conflicting styles are applied.

    By systematically checking these aspects and debugging the code, you should be able to identify the issue causing the disappearance of the RadGrid table after filtering.

No answers yet. Maybe you can help?

Ajax AjaxLoadingPanel AjaxPanel Filter Grid
Asked by
Top achievements
Rank 1
Share this question