Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Grid > allow scroll property into IE-7 is now working well
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered allow scroll property into IE-7 is now working well

Feed from this thread
  • vikas gupta avatar

    Posted on Jun 15, 2011 (permalink)

    Hi..

    i am using a telerik grid.i have set its property allow scroll=true.

    in IE-8 its showing only vertical scroll bar
    and
    IE-7 its showing both vertical and horizontally scroll bar.

    i want to show only vertical scroll bar in both IE-7 and IE-8.
    i have to use property(Use Static header=true).even i set it false.then its have same problem.

    How can i do this?

  • Posted on Jun 15, 2011 (permalink)

    Hello Vikas,

    Check out the following forum which discussed the same.
    Allow vertical scroll but not horizontal scroll in IE8.

    Thanks,
    Shinu.

  • vikas gupta avatar

    Posted on Jun 15, 2011 (permalink)

    Hello shinu..

    i am getting the problem only  into IE-7.
    In IE-7 its showing the horizontal scroll bar
    but  in IE-8 and other browsers(Mozilla.Chrome etc.) its showing vertical scroll bar only

    i want to show only vertical scroll bar (in all browser including IE-7) not  the horizontal scroll bar...
    i

    i have attached Problem related jpeg files.please review it and tell me what changes will be needed here  to solve this problem

    i want to send you demo application but there is no option to attach any .rar file so i am pasting my code here.

     
    Demo Code:


    aspx page code:
     <telerik:RadGrid runat="server" ID="RadGrid_List" AutoGenerateColumns="false" Width="943px"
            AllowSorting="true" AllowMultiRowSelection="True" Skin="Office2007" PageSize="100"
            AllowPaging="true" GridLines="None" Visible="true" Style="margin-top: 0px"
            AllowAutomaticInserts="False" BorderWidth="0">
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            <MasterTableView DataKeyNames="CompanyId" AllowMultiColumnSorting="true" Width="95%"
                CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false"
                InsertItemPageIndexAction="ShowItemOnCurrentPage" CommandItemDisplay="None" ShowHeader="true"
                TableLayout="Auto" RetrieveAllDataFields="false">
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="StateName" SortOrder="Ascending" />
                    <telerik:GridSortExpression FieldName="AgencyName" SortOrder="Ascending" />
                </SortExpressions>
               
                <Columns>
                    
                    
                    <telerik:GridBoundColumn DataField="AgencyName" HeaderText="Agency" SortExpression="AgencyName"
                        UniqueName="tt1" HeaderStyle-Width="100px" />
                        
                         <telerik:GridBoundColumn DataField="StateName" HeaderText="State" 
                        UniqueName="tt1" HeaderStyle-Width="100px" />
                        
                    <telerik:GridBoundColumn DataField="LiveDate" DataFormatString="{0:MM/dd/yy}" HeaderText="LiveDate"
                        SortExpression="LiveDate" HeaderStyle-Width="55px" />
                        
                    <telerik:GridTemplateColumn HeaderText="Company" HeaderStyle-Width="100px" DataField="CompanyName"
                        ItemStyle-Width="45px">
                        <ItemTemplate>
                            <asp:Label ID="lbCompanyName" runat="server" Text='<%#Eval("CompanyName") %>' Width="95px"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Code" UniqueName="Code" SortExpression="CompanyAgencyCodeName"
                        HeaderStyle-Width="90px" DataField="CompanyAgencyCodeName">
                        <ItemTemplate>
                            <asp:TextBox Visible="false" ID="txtCompanyAgencyCodeName" Text='<%#Eval("CompanyAgencyCodeName") %>'
                                runat="server" Width="75px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
                            <asp:Label ID="lbCompanyAgencyCodeName" runat="server" Text='<%#Eval("CompanyAgencyCodeName") %>'
                                Width="75px"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Submitted" Resizable="true" SortExpression="SubmitedDate"
                        HeaderStyle-Width="65px" DataField="SubmitedDate" UniqueName="SubmitedDate">
                        <ItemTemplate>
                            <asp:TextBox ID="txtSubmittedDate" runat="server" Width="50px" Visible="false" BorderStyle="Solid"
                                BorderWidth="1px" />
                            <asp:CompareValidator ID="cvSubmittedDate" runat="server" ControlToValidate="txtSubmittedDate"
                                Enabled="false" ErrorMessage="*" Operator="DataTypeCheck" Type="Date" Display="Dynamic" />
                            <asp:Label Width="50px" ID="lbSubmitted" runat="server" Text='<%#Eval("SubmitedDate",  "{0:MM/dd/yy}") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Issued" Resizable="true" SortExpression="IssuedDate"
                        HeaderStyle-Width="65px" DataField="IssuedDate" UniqueName="IssuedDate">
                        <ItemTemplate>
                            <asp:Label ID="lbIssuedDate" runat="server" Text='<%#Eval("IssuedDate", "{0:MM/dd/yy}") %>'
                                Width="50px"></asp:Label>
                            <asp:TextBox ID="txtIssuedDate" runat="server" Visible="false" Width="50px" BorderStyle="Solid"
                                BorderWidth="1px" />
                            <asp:CompareValidator ID="cvIssuedDate" runat="server" ControlToValidate="txtIssuedDate"
                                Enabled="false" ErrorMessage="*" Operator="DataTypeCheck" Type="Date" Display="Dynamic" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridTemplateColumn HeaderText="Cancelled" Resizable="true" SortExpression="CancelledDate"
                        HeaderStyle-Width="65px" DataField="CancelledDate" UniqueName="CancelledDate">
                        <ItemTemplate>
                            <asp:Label ID="lbCancelledDate" runat="server" Text='<%#Eval("CancelledDate", "{0:MM/dd/yy}") %>'
                                Width="50px"></asp:Label>
                            <asp:TextBox ID="txtCancelledDate" Visible="false" runat="server" Width="50px" BorderStyle="Solid"
                                BorderWidth="1px" />
                            <asp:CompareValidator ID="cvCancelledDate" runat="server" ControlToValidate="txtCancelledDate"
                                Enabled="false" ErrorMessage="*" Operator="DataTypeCheck" Type="Date" Display="Dynamic" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                    <telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments"
                        UniqueName="Comments" Visible="false" />
                        
                    <telerik:GridTemplateColumn HeaderText="Comments" UniqueName="Comments" SortExpression="Comments"
                        DataField="Comments" HeaderStyle-Width="200px" Visible="true">
                        <ItemTemplate>
                            <asp:TextBox Visible="false" ID="txtDescription" Text='<%#Eval("Comments") %>' runat="server"
                                BorderStyle="Solid" BorderWidth="1px" Style="width: auto;" onFocus="hideToltip();"></asp:TextBox>
                            <asp:Label ID="lbDescription" runat="server" Text='<%#Eval("comments") %>' Style="width: 100%;"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="RawComments" UniqueName="RawComments" SortExpression="RawComments"
                        Resizable="true" HeaderStyle-Width="0px" DataField="RawComments" Visible="false">
                        <ItemTemplate>
                            <asp:TextBox Visible="false" ID="txtRawDescription" Text='<%#Eval("RawComments") %>'
                                runat="server" BorderStyle="Solid" Width="0px" BorderWidth="1px" onFocus="hideToltip()"></asp:TextBox>
                            <asp:Label ID="lbRawDescription" runat="server" Text='<%#Eval("rawcomments") %>'
                                Width="0px"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Active" Resizable="true" HeaderStyle-Width="0px"
                        Visible="false">
                        <ItemTemplate>
                            <asp:HiddenField ID="hdIsActive" runat="server" Value='<%#Eval("IsActive") %>' />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Cancelled" Resizable="true" Visible="false"
                        SortExpression="CancelledDate" HeaderStyle-Width="0px" DataField="CancelledDate"
                        UniqueName="CancelledDate">
                        <ItemTemplate>
                            <asp:Label ID="terminate" runat="server" Text='<%#Eval("TerminationDate", "{0:MM/dd/yyyy}") %>'
                                Width="10px" Visible="false"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="true" FrozenColumnsCount="0" UseStaticHeaders="true" />
                <ClientEvents />
            </ClientSettings>
        </telerik:RadGrid>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

    aspx.cs code

    protected void getData()
        {
            
            DataTable Output = new DataTable();
            Output.Columns.Add("CompanyId", typeof(Int32));
            Output.Columns.Add("AgencyName", typeof(String));
            Output.Columns.Add("StateName", typeof(String));
            Output.Columns.Add("LiveDate", typeof(String));
            Output.Columns.Add("CompanyName", typeof(String));
            Output.Columns.Add("CompanyAgencyCodeName", typeof(String));
            Output.Columns.Add("SubmitedDate", typeof(String));
            Output.Columns.Add("IssuedDate", typeof(String));
            Output.Columns.Add("CancelledDate", typeof(String));
            Output.Columns.Add("Comments", typeof(String));
            Output.Columns.Add("RawComments", typeof(String));
            Output.Columns.Add("IsActive", typeof(string));
            Output.Columns.Add("TerminationDate", typeof(string));

            for (Int32 i = 0; i <= 15; i++)
            {
                DataRow final = Output.NewRow();
                final["CompanyId"] = "1";
                final["StateName"] = "testing1";
                final["AgencyName"] = "testing2";
                final["LiveDate"] = "10/5/2012";
                final["CompanyName"] = "testing4";
                final["CompanyAgencyCodeName"] = "sfsfs";
                final["SubmitedDate"] = "10/5/2012";
                final["IssuedDate"] = "10/5/2012";
                final["CancelledDate"] = "10/5/2012";
                final["Comments"] = "testing9";
                final["RawComments"] = "testing9";
                final["IsActive"] = "True";
                final["TerminationDate"] = "10/5/2012";


                Output.Rows.Add(final);
            }
            RadGrid_List.DataSource = Output;
            RadGrid_List.DataBind();

              }


    Thanks
    Attached files

  • Pavlina Pavlina admin's avatar

    Posted on Jun 20, 2011 (permalink)

    Hi Vikas,

    IE6 and IE7 apply column widths differently, compared to other browsers - they also add the cell padding to the set width, so the columns actually become wider than specified. This is why a horizontal scrollbar occurs in IE7.

    In your case you can leave one column with no width to avoid this issue.

    Regards,
    Pavlina
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

  • vikas gupta avatar

    Posted on Jun 28, 2011 (permalink)

    please can you send me any demo working example for this or please do correction into my above code...

  • Pavlina Pavlina admin's avatar

    Posted on Jun 28, 2011 (permalink)

    Hi Vikas,

    I followed your scenario and prepared a sample project where the horizontal scroll does not appear under IE7. Please give it a try and let me know if you need further assistance.

    All the best,
    Pavlina
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

    Attached files

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Grid > allow scroll property into IE-7 is now working well