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

[Solved] Grouping not working

3 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Appu
Top achievements
Rank 1
Appu asked on 29 Jun 2009, 07:19 AM

Hello sir,

       Collapsing and enlarging group is not working in Rad Grid. I am calling RefreshCombos() function given in demo site from Rad grid PreRender event. But is working before filtering controls is calling but not working once after the items is filtered. I dont know what is the proble.. So plz help me to find the solution.

I am using the following code in order to work filtering properly:
 protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
 
        if ((RadGrid1.MasterTableView.FilterExpression != string.Empty ))
        {
            RefreshCombos();
        }
        
    }

Regards,
Appu

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 29 Jun 2009, 09:26 AM
Hello Appu,

I suggest you bind the Grid using AdvanceDataBinding techniques and let me know if this helps:
More information is available in the following help article
Advanced Data-binding (using NeedDataSource event)

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Appu
Top achievements
Rank 1
answered on 29 Jun 2009, 09:34 AM
Hi Pavlina
                I am using the ordinary databinding technoque instead of Advanced. All i needed have been done but except grouping.

I mentioned earlier grouping is doing well only befoere filtering. I am Rebinding the MasterTable instantly with the filter expression of MasterTableView.

      
    
            RadGrid1.MasterTableView.FilterExpression = filterExpression;

       objDataAccess = new DataAccess();
        contactsTable = objDataAccess.GetContacts();

        RadGrid1.DataSource = contactsTable;
        RadGrid1.MasterTableView.Rebind();
       
So i am assuming the prblem occures when we calling tradintional databinding technique in the page load event like..
           
           If(!Page.Ispostback)
          {
            RadGrid1.DataSource = contactsTable;
            RadGrid1.DataBind();
         }

So plz kindly clarify me for my this problem

Regards,
Appu
0
Pavlina
Telerik team
answered on 29 Jun 2009, 01:52 PM
Hello Appu,

Simple data-binding through the DataBind() method can be used in simple scenarios which do not require the grid to perform complex operations such as grouping. For advanced features such as grouping, RadGrid must be bound using declarative data sources or through the NeedDataSource event. When using declarative data sources or the NeedDataSource event, RadGrid can automatically accommodate the appropriate database operations without the need for you explicitly handle any sorting, paging, grouping, and so on.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Appu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Appu
Top achievements
Rank 1
Share this question
or