This is a migrated thread and some comments may be shown as answers.
Issue with RadGrid Grouping
2 Answers 50 Views
This is a migrated thread and some comments may be shown as answers.
Wenchao
Top achievements
Rank 1
Wenchao asked on 10 Dec 2008, 06:21 AM
Hi,
I have a radgrid and set grouping enabled, after I drag some columns on the header it's working fine, but when I click next page, sometimes it gives me hte error like this:
Error Message
it's not always happening, for me it happened on the boundary of two different categories.And the radgrid is on the updatepanel.
Is there any other setting for the grouping?
thx

2 Answers, 1 is accepted

Sort by
0
Wenchao
Top achievements
Rank 1
answered on 10 Dec 2008, 10:42 PM

After trying something different, the issues seems about the "pager style->mode->Slider", if I change the style to something else e.g "

 

NextPrevAndNumeric

 

", there would be no problem at all.

And I can provide a small demo about this bug, but with different result.
 as I can not upload attachment, I just give a simple description. create a new webpage, drag an "UpdatePanel" to the page, and another RadGrid on the updatepanel enable paging, sorting and set the pager style mode to slider, assign datasource in the code behind, when you click page 2, everything disappeared on the second page. but if you change the "mode" to "NextPrevAndNumeric", it would be fine.

<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
        </div> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
         <ContentTemplate> 
          <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"   
          AllowSorting="True" GridLines="None" ShowGroupPanel="True"   
           AllowFilteringByColumn="True" Skin="Default2006">  
           <HeaderContextMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200">  
            </CollapseAnimation> 
           </HeaderContextMenu> 
           <PagerStyle Mode="Slider" /> 
           <MasterTableView> 
            <RowIndicatorColumn> 
             <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
             <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <PagerStyle Mode="Slider" /> 
           </MasterTableView> 
           <ClientSettings AllowDragToGroup="True">  
           </ClientSettings> 
           <FilterMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200">  
            </CollapseAnimation> 
           </FilterMenu> 
          </telerik:RadGrid> 
         </ContentTemplate> 
        </asp:UpdatePanel> 
    </form> 
</body> 
public partial class _Default : System.Web.UI.Page   
{  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        RadGrid1.DataSource = GenerateTable();  
    }  
 
    private DataTable GenerateTable()  
    {  
        DataTable table = new DataTable();  
        table.Columns.Add("CategoryID"typeof(int));  
        table.Columns.Add("CategoryName"typeof(string));  
        table.Columns.Add("Description"typeof(string));  
 
        table.Rows.Add(1, "Beverages""Soft drinks, coffees, teas, beers, and ales");  
        table.Rows.Add(2, "Condiments""Sweet and savory sauces, relishes, spreads, and seasonings");  
        table.Rows.Add(3, "Confections""Desserts, candies, and sweet breads");  
        table.Rows.Add(4, "Dairy Products""Cheeses");  
        table.Rows.Add(5, "Grains/Cereals""Breads, crackers, pasta, and cereal");  
        table.Rows.Add(6, "Meat/Poultry""Prepared meats");  
        table.Rows.Add(7, "Produce""Dried fruit and bean curd");  
        table.Rows.Add(8, "Seafood""Seaweed and fish");  
        table.Rows.Add(9, "Seafood""Seaweed and fish1");  
        table.Rows.Add(10, "Seafood""Seaweed and fish2");  
        table.Rows.Add(11, "Seafood""Seaweed and fish3");  
        table.Rows.Add(12, "Seafood""Seaweed and fish4");  
        table.Rows.Add(13, "Seafood""Seaweed and fish5");  
        table.Rows.Add(14, "Seafood""Seaweed and fish6");  
        table.Rows.Add(15, "Seafood""Seaweed and fish7");  
        table.Rows.Add(16, "Seafood""Seaweed and fish8");  
 
        return table;  
    }  
0
Rosen
Telerik team
answered on 12 Dec 2008, 08:35 AM
Hello Wenchao,

I'm afraid that I'm unable to reproduce the error you have described with the provided example. However please note that when using advanced grid features as grouping, filtering, paging, sorting it is recommended to either use the Advanced databinding or Declarative databinding technique.

Best wishes,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Wenchao
Top achievements
Rank 1
Answers by
Wenchao
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or