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

Radgrid disappears inside RadMultiPage when sorting

3 Answers 81 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Sunil
Top achievements
Rank 1
Sunil asked on 12 Mar 2011, 12:27 PM
Hi all,

I've a radgrid inside a radmultipage view. Everything works as it should apart from when I come to sorting. When I click on a sorting header, the radgrid disappears in the radpageview.... Sessionviewstate is enabled in my project... Below is the relevant code and code behind. Does anyone know why this is happening?

<telerik:RadTabStrip ID="RadTabStrip_Reserved_User_IDs" runat="server" Width="400px" ScrollChildren="false"
                SelectedIndex="0" Skin="Web20" MultiPageID="RadMultiPage_Terminal_Edit">
                <Tabs>
                    <telerik:RadTab Text="Reserved IDs: ">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Activated IDs:">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Reserve an ID:">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
  
            <telerik:RadMultiPage ID="RadMultiPage_Terminal_Edit" runat="server" SelectedIndex="0">
                  
                    <telerik:RadPageView ID="RadPageView_Reserved_IDs" runat="server">
  
                        <telerik:RadGrid ID="RadGrid_Reserved_IDs" runat="server" AutoGenerateColumns="false" 
                        AllowMultiRowSelection="false" AllowPaging="True" PageSize="10"
                        GridLines="None" CellPadding="0" AllowSorting="true" Skin="Default"
                        OnItemDataBound="Check_Reserved_User_ID_Type">
                            <PagerStyle Mode="NextPrevAndNumeric"/>
                            <MasterTableView Width="100%" CommandItemDisplay="Top" GridLines="None" 
                            DataKeyNames="IndexKey">
                            <CommandItemTemplate>
                                <telerik:RadToolBar ID="RadToolBar_Terminals" runat="server" Skin="Default" 
                                Width="100%">
                                    <Items>
                                        <telerik:RadToolBarButton Text="Edit Reserved ID" Visible="true"
                                         ImageUrl="Images/Edit.gif" runat="server">
                                        </telerik:RadToolBarButton>
                                    </Items>
                                </telerik:RadToolBar>
                            </CommandItemTemplate>
                                <Columns>
                                    <telerik:GridClientSelectColumn UniqueName="Checkbox_Reserved_ID"/>
  
                                    <telerik:GridTemplateColumn UniqueName="Reserved_ID_Type"
                                    HeaderText="Type">
                                        <ItemTemplate>
                                            <asp:Literal ID="Literal_Type" runat="server" Text="N/A">
                                            </asp:Literal>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
  
                                    <telerik:GridBoundColumn UniqueName="Reserved_ID_nType" DataField="nType" 
                                    HeaderText="Reserved Type" Visible="false"/>
  
                                    <telerik:GridBoundColumn UniqueName="Reserved_ID_IndexKey" DataField="IndexKey" 
                                    HeaderText="Reserved ID Index Key" Visible="false"/>
                                      
                                    <telerik:GridBoundColumn UniqueName="Reserved_ID_UserName" DataField="UserName" 
                                    HeaderText="Name" SortExpression="UserName"/>
  
                                    <telerik:GridBoundColumn UniqueName="Reserved_ID_UserID" DataField="UserID" HeaderText="User ID"
                                     SortExpression="UserID"/>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <ClientEvents/>
                                <Selecting AllowRowSelect="true"/>
                            </ClientSettings>
                        </telerik:RadGrid>
  
                    </telerik:RadPageView>


Code-Behind:

protected void Page_Load(object sender, EventArgs e)
        {
            if ((Boolean)Session["Page_First_Load"] == true)
            {
                Display_Reserved_Users(0);
            }
          Session["Page_First_Load"] = false;
        }
  
.....
  
protected void Display_Reserved_Users(int rebuild)
        {
  
            SqlDataSource_Reserved_IDs = new SQL_Data_Source().getSQLDataSource();
            SqlDataSource_Reserved_IDs.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
            SqlDataSource_Reserved_IDs.SelectCommand = "OnTime_sp_Reserved_User_List";
            SqlDataSource_Reserved_IDs.SelectParameters.Add("Param_Customer_ID_Ref", (string)Session["User_Belongs_To_Customer_Ref_ID"]);
            SqlDataSource_Reserved_IDs.SelectParameters.Add("Param_Company_ID_Ref", (string)Session["User_Belongs_To_Company_Ref_ID"]);
  
            RadGrid_Reserved_IDs.DataSource = SqlDataSource_Reserved_IDs;
  
            if (rebuild == 1)
            {
                RadGrid_Reserved_IDs.Rebind();
            }
  
        }


3 Answers, 1 is accepted

Sort by
0
Sunil
Top achievements
Rank 1
answered on 14 Mar 2011, 01:21 PM
Anyone?
0
Kate
Telerik team
answered on 15 Mar 2011, 12:01 PM
Hi Sunil,

I tried the scenario that you describe but I do not get that behaviour. I have attached a working project. Please check it and modify it in a way that the problem appears, so we can help you resolve it.

Greetings,
Kate
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jesse
Top achievements
Rank 1
answered on 05 Dec 2012, 03:30 PM
I have same issue. When session dead, if you click any column header, the whole grid will dispear. You need reload the page.
Tags
TabStrip
Asked by
Sunil
Top achievements
Rank 1
Answers by
Sunil
Top achievements
Rank 1
Kate
Telerik team
Jesse
Top achievements
Rank 1
Share this question
or