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

radgrid scrolling with static headers

1 Answer 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elisheva Wasserman
Top achievements
Rank 1
Elisheva Wasserman asked on 02 Aug 2010, 08:45 AM
Hhello everyone,
I am using hierarchical radgrid with mastertableview and nestedtableview that contains another grid inside,
I am trying to use  scroll with static headers in the master grid, scroll apears, headers staying in theire position and every thing looks great,
However, when the user clicks outside of the grid, or makes any action on the page , the data in the section is disappear
yes, I am using neeDataSource event, this is not the problem, I don't see any postback when it's happaning..

can any one help

here is my relevant code


<telerik:RadGrid ID="institutes" Skin="Skin" runat="server" AutoGenerateColumns="False" EnableEmbeddedSkins="false"   OnItemCommand="itemCommand" OnNeedDataSource="needDataSource"
        AllowSorting="False" AllowMultiRowSelection="False" AllowPaging="False" PageSize="5" 
        GridLines="None"  ShowFooter="True"  OnGroupsChanging="Group"  ShowGroupFooter="true"   >
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <GroupingSettings ShowUnGroupButton="true" RetainGroupFootersVisibility="true"    />
       
 
 
 
        <ClientSettings>
              <ClientEvents OnHierarchyCollapsed="HierarchyCollapsed" OnHierarchyExpanding="RadGrid1_HierarchyExpanding" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>
        <MasterTableView AllowMultiColumnSorting="False" DataKeyNames="InstitueId,Id" ExpandCollapseColumn-ExpandImageUrl="../Images/expand1.png"
            ExpandCollapseColumn-ButtonType="ImageButton" ExpandCollapseColumn-CollapseImageUrl="../Images/minus.png"
            ShowGroupFooter="false" HierarchyLoadMode="ServerOnDemand"   ExpandCollapseColumn-AutoPostBackOnFilter="false"  GroupsDefaultExpanded="false" GroupLoadMode="Server"
            AllowSorting="false">
             
              <GroupByExpressions>
                    <telerik:GridGroupByExpression  >
                    <GroupByFields  >
                    <telerik:GridGroupByField FieldName="Town"  FieldAlias="רשות" />
                    </GroupByFields>
                    <SelectFields>
                     <telerik:GridGroupByField FieldName="Town"   FieldAlias="רשות" HeaderValueSeparator=" "   />
                     <telerik:GridGroupByField FieldName="Quantity"  FieldAlias="אוכלים" FormatString="                              {0}     "  HeaderText=" " Aggregate="Sum"       HeaderValueSeparator=""   />                     <telerik:GridGroupByField FieldName="ChangeQuantity"   HeaderText=" " Aggregate="Sum"  FormatString="                            {0}"   HeaderValueSeparator="  "  />
               
                   </SelectFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
            <Columns>
                
                 <telerik:GridBoundColumn HeaderText="סמל" DataField="Semel" UniqueName="Semel" >
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="מוסד" DataField="Name" UniqueName="Institue" >
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="אוכלים בפועל" DataField="Quantity" DataFormatString="{0:N0}" UniqueName="InstitueQuantity"
                    FooterAggregateFormatString="סה"כ אוכלים בפועל :{0:N0}" Aggregate="Sum" >
                </telerik:GridBoundColumn>
                
                
            <telerik:GridTemplateColumn HeaderText="כמות מבוקשת" Aggregate="Sum" FooterAggregateFormatString="<div id='total' >כמות מבוקשת {0:N0} </div>" UniqueName="InstitueChangeQuantity"
                    DataField="ChangeQuantity">
                    <ItemTemplate>
                        <div id='<%#Eval("Id")+"tot" %>' >
                            <%#((decimal)Eval("ChangeQuantity")).ToString("0")%>
                        </div>
                    </ItemTemplate>
</telerik:GridTemplateColumn>
                  <telerik:GridTemplateColumn HeaderText="סטטוס" DataField="Status.Code" UniqueName="InstitueStatus" ItemStyle-Width="150px"  >
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hidStatusCode" runat="server" Value='<%#Eval("Status.Code") %>' />
                                                <asp:Label ID="lblStatus" runat="server">
                                                    <telerik:RadBinaryImage ID="imageStatus" runat="server" ImageAlign="Middle" ImageUrl='<%# "../Images/" +Eval("Status.Icon")+"_16_normal.png" %>'
                                                        Width="12px" Height="12px" /> 
                                                    <%#Eval("Status.Name")%></asp:Label>
                                               
                                              
                                            </ItemTemplate>
                </telerik:GridTemplateColumn>
                 
            </Columns>
            <NestedViewTemplate>
                <asp:Panel runat="server" ID="InnerContainer" Visible="true" CssClass="viewWrap">
                    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" Skin=""    Style="padding-right: 20px;" SelectedIndex="0" OnClientTabSelected="tabSelected" >
                        <Tabs>
                            <telerik:RadTab runat="server" Text="פירוט מנות" PageViewID="PageView1" SelectedCssClass="SelectedTab"
                                CssClass="CustomTab">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="מאפיינים" PageViewID="PageView2" SelectedCssClass="SelectedTab"
                                CssClass="CustomTab">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
                    <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" >
                        <telerik:RadPageView runat="server" ID="PageView1">
                            <!--Item (Classes) Grid  -->
                            <telerik:RadGrid runat="server" OnItemDataBound="dgItems_ItemCreated" ID='itemsGrid'
                                ShowFooter="true" EnableLinqExpressions="false" OnNeedDataSource="itemsGrid_NeedDataSource"
                                AllowSorting="false" Skin="Skin" EnableEmbeddedSkins="false"  >
                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="false"
                                    ShowFooter="false" ClientDataKeyNames="SmartId,Id,Status.Code,Quantity" DataKeyNames="SmartId,Id"
                                    HierarchyLoadMode="ServerOnDemand">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <AlternatingItemStyle HorizontalAlign="Right" />
                                    <Columns>
                                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
                                        <telerik:GridBoundColumn HeaderText="כיתה" DataField="ClassName" UniqueName="Class">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="פריט" DataField="ItemName"  UniqueName="ItemOrAccount" >
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridBoundColumn HeaderText="אוכלים בפועל" DataField="Quantity" DataFormatString="{0:N0}" UniqueName="Quantity1">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn HeaderText="כמות מבוקשת" DataField="ChangeQuantity" UniqueName="requestQuantity1">
                                            <ItemTemplate>
                                                <telerik:RadNumericTextBox ID="request1" Width="50px" ShowSpinButtons="true" NumberFormat-DecimalDigits="0"
                                                    MinValue="0" AllowOutOfRangeAutoCorrect="true" BorderStyle="None" runat="server"
                                                    AutoPostBack="false"  DbValue='<%#Eval("ChangeQuantity") %>'  ClientEvents-OnValueChanged="quantityChanged">
                                                </telerik:RadNumericTextBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                          <telerik:GridCalculatedColumn HeaderText="הפרש" UniqueName="Difference1" DataType="System.Double"
                                            DataFields="ChangeQuantity,Quantity" Expression="{0}-{1}" Aggregate="Sum" />
                                    
                                         <telerik:GridBoundColumn HeaderText="תקציב מאושר" DataField="Price" DataFormatString="{0:N0}" UniqueName="Quantity2"  Display="false">
                                        </telerik:GridBoundColumn>
                                         
                                        <telerik:GridTemplateColumn HeaderText="תקציב מבוקש" DataField="ChangeAmount" UniqueName="requestAmount" Display="false">
                                            <ItemTemplate>
                                                <telerik:RadNumericTextBox ID="requestAmount" Width="50px" ShowSpinButtons="true" NumberFormat-DecimalDigits="0"
                                                    MinValue="0" AllowOutOfRangeAutoCorrect="true" BorderStyle="None" runat="server"
                                                    AutoPostBack="false" DbValue='<%#Eval("ChangeAmount") %>' ClientEvents-OnValueChanged="quantityChanged">
                                                </telerik:RadNumericTextBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridCalculatedColumn HeaderText="הפרש" UniqueName="Difference2" DataType="System.Double"  Display="false"
                                            DataFields="ChangeAmount,Price" Expression="{0}-{1}" Aggregate="Sum" />
                                        <telerik:GridTemplateColumn HeaderText="סיבת שינוי" UniqueName="changeReason">
                                            <ItemTemplate>
                                                <telerik:RadComboBox DataTextField="Name" DataValueField="Id" ID="changeReasons"
                                                    runat="server" Width="80px">
                                                </telerik:RadComboBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                         
                                        <telerik:GridCalculatedColumn HeaderText="סהכ" UniqueName="SumField" DataType="System.Double"  Display="false"
                                            DataFields="Amount" Expression="" Aggregate="Sum" />
                                     
                                         
                                        <telerik:GridTemplateColumn HeaderText="סטטוס" DataField="Status.Code" UniqueName="Status">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hidStatusCode" runat="server" Value='<%#Eval("Status.Code") %>' />
                                                <asp:Label ID="lblStatus" runat="server">
                                                    <telerik:RadBinaryImage ID="imageStatus" runat="server" ImageAlign="Middle" ImageUrl='<%# "../Images/" +Eval("Status.Icon")+"_16_normal.png" %>'
                                                        Width="12px" Height="12px" /> 
                                                    <%#Eval("Status.Name")%></asp:Label>
                                                <telerik:RadComboBox DataValueField="Code" ID="ddlStatus" runat="server" DataTextField="Name"
                                                    Width="120px" Visible="false" OnClientSelectedIndexChanged="statusChanged">
                                                    <ItemTemplate>
                                                        <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" ImageUrl='<%# "../Images/" +Eval("Icon")+"_16_normal.png" %>' />
                                                        <%#Eval("Name") %>
                                                    </ItemTemplate>
                                                </telerik:RadComboBox>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                         
                                           
                                         
                                    </Columns>
                                </MasterTableView>
                                <ClientSettings>
                                    <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeSelected" />
                                    <Selecting AllowRowSelect="true" />
                                    
                                </ClientSettings>
                            </telerik:RadGrid>
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pageView2" runat="server"  >
                            
                         <div style="text-align:right;padding-right:-200px;">
                             
                            <iframe id='<%#"ifr_"+Eval("InstitueId") %>' width="100%" height="500px"   src="about:blank" frameborder="0" scrolling="no" style="position:static;" ></iframe>
                           
                         </div>
                        </telerik:RadPageView>
                    </telerik:RadMultiPage>
                </asp:Panel>
            </NestedViewTemplate>
        </MasterTableView>
         
         
    </telerik:RadGrid>

Thanks in advance

Eli

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 04 Aug 2010, 07:47 PM
Hi Elisheva,

I reviewed the code, and it looks correct. However, in order to properly look into this, it will be best if you open a formal support ticket, and send us a small working project, demonstrating the issue. We will debug it locally, and get back to you with more information on the matter.

Regards,
Pavlina
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
Tags
Grid
Asked by
Elisheva Wasserman
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or