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

Radgrid rebind issue on filter

8 Answers 432 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 20 Oct 2010, 09:27 AM
Hi Telerik,

I am using Radgrid Q2 2010, VS 2005. I am binding the grid with more than 40000 records. First time i am binding only distinct values in each column, so the number of records is comparatively less. Then when i filter the grid,  I perform the filter on the 40000 records, and after filter it may contain a minimum of 35000 records. When i rebind the grid with the filtered result, sometimes it throws this error 
" htmlfile: Could not get the value property. Not enough storage is available to complete this operation." Or sometimes the browser is not responding and gets closed.

Please reply me asap. Its a very urgent requirement.

Thanks

8 Answers, 1 is accepted

Sort by
0
Priya
Top achievements
Rank 1
answered on 20 Oct 2010, 11:34 AM
Please do give me a solution asap.
Thanks in advance
0
Nikolay Rusev
Telerik team
answered on 22 Oct 2010, 12:10 PM
Hello Priya,

Do you have paging enabled on RadGrid? If not please give it a try and let me know how it goes.
I suspect that content(HTML markup) generated is to much to for the browser to handle it.

Regards,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Priya
Top achievements
Rank 1
answered on 24 Oct 2010, 01:11 PM
Hi,

 My requirement is that i dont want to enable paging for radgrid.

Thanks
0
Priya
Top achievements
Rank 1
answered on 24 Oct 2010, 02:57 PM

Hi,

I have another issue with Filtering in RadGrid. First time when I bind the grid dynamically, I bind it with distinct records (say for example 100 records) out of the total data (3000 records) from a dataset in some event. Then when filter is applied, I set the entire data (3000 records) as data source to grid in the NeedDataSource Event. So filter will be actually applied to the entire data (3000 records) but grid shows only 100 distinct records. Now when I apply filter on one column (Name), I get 20 records and then I apply on another column (Age) I get 10 records. Now when I select NoFilter on Age I get back 20 records. Till this it is working fine. Now when I apply NoFilter on Name I should get only 100 distinct records. But I am getting 3000 records because NeedDataSource has 3000 records. Please give me a solution for this asap.

Thanks

0
Nikolay Rusev
Telerik team
answered on 27 Oct 2010, 12:26 PM
Hello Priya,

When you clear all filter expressions in RadGrid it will bind to all the records supplied on NeedDataSource and this is expected behavior.

Regards,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bidhan
Top achievements
Rank 2
answered on 07 Jan 2011, 02:08 AM
Hi there,
i am getting an issue with the rebinding RadGrid with advanced binding process.
i have one predefined dataset to view as default and for Sorting,Paging, Refreshing, and Filtering i do modify the dataset accordingly.it all work perfectly except the situation where i remove the Filter and the dataset just got the entire data where as i was expecting to get my predefined dataset [which is nothing but a empty row]
how should i handle the Filtering operation. i need to know the triggering point of filtering operation, so that i can put some flag to handle my rules
Any help would highly appreciated.
here is the code that i have tried:

  public partial class CrmSearch : System.Web.UI.Page
    {
       CrmInteraction CI = new CrmInteraction();
      // DataView dtCommon = new DataView();
       protected void Page_Load(object sender, EventArgs e)
        {                  
            if (!Page.IsPostBack)
            {
                InitalizeControls();              
                //DefaultBiding();
                DataView dvContactAndLeadRecords = CI.GetContactAndLeadRecords(false);//this is for showing only the empty row rather showing entire list
                this.RadGridContacts.DataSource = dvContactAndLeadRecords;                
            }
           
        }
        #region Custom Methods      
         public void DefaultBiding()
        {          
            DataView dvDefaultBinding = CI.GetContactAndLeadRecords(false);
            this.RadGridContacts.DataSource = dvDefaultBinding;
            this.RadGridContacts.GroupingSettings.CaseSensitive = false;
            this.RadGridContacts.Rebind();//.DataBind();
        }
        #endregion
        public void InitalizeControls()
        {          
        }

        protected void RadGridContacts_SortCommand(object source, GridSortCommandEventArgs e)
        {
            Session.Add("NotDefaultSearch", true);
        }          

        protected void RadGridContacts_PreRender(object sender, EventArgs e)
        {
            GridFilterMenu menu = RadGridContacts.FilterMenu;
            foreach (GridColumn col in RadGridContacts.MasterTableView.RenderColumns)
            {
                if (col.UniqueName == "FName" || col.UniqueName == "LName" || col.UniqueName == "Organisation")
                {
                    GridFilterMenu menuFName = RadGridContacts.FilterMenu;
                    if (menu.Items.Count > 0)
                    {                       
                        menu.Items[7].Visible=false;//GreaterThan;
                        menu.Items[8].Visible = false; //LessThan
                        menu.Items[9].Visible=false;//GreaterThanOrEqualTo;
                        menu.Items[10].Visible=false;//LessThanOrEqualTo;
                        menu.Items[11].Visible=false;//Between;
                        menu.Items[12].Visible=false;//NotBetween;
                        menu.Items[13].Visible = false;//NotIsEmpty;
                        menu.Items[14].Visible = false; //IsEmpty
                        menu.Items[15].Visible = false;//IsNull;
                        menu.Items[16].Visible = false;//NotIsNull;
                    }                   
                }               
            }
        }

        protected void RadGridContacts_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            bool NotDefaultSearch = Session["NotDefaultSearch"] != null ? bool.Parse(Session["NotDefaultSearch"].ToString()) : false;
            DataView dvContactAndLeadRecords = CI.GetContactAndLeadRecords(true);
            this.RadGridContacts.DataSource = dvContactAndLeadRecords;            
        } 
    }

0
Nikolay Rusev
Telerik team
answered on 12 Jan 2011, 04:38 PM
Hello Bidhan,

As I stated in my previous post if RadGrid does not have FilterExpressions applied it will bind to all the data supplied as DataSource.

Best wishes,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Bidhan
Top achievements
Rank 2
answered on 12 Jan 2011, 10:28 PM
thanks Nikolay,
it was very helpful. i have applied FilterExpressions for each time i need to rebind with different datasets.


thanks
Tags
Grid
Asked by
Priya
Top achievements
Rank 1
Answers by
Priya
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Bidhan
Top achievements
Rank 2
Share this question
or