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

[Solved] Horizontal scroll bar issue

1 Answer 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adesh
Top achievements
Rank 1
Adesh asked on 22 Aug 2013, 01:46 PM
Hi,

I have implemented a radgrid that will hold the records from a database table say employee table.
I have kept the width of grid as say 420 px and wanted to grow the grid downwards as the new employee names are added.
So no vertical scroll bar required.
css that helped me  to acheive this -> 
-------------------------
 .MyGridClass .rgDataDiv
    {
        height: auto !important;
    }

---------------
But when say the employee name is more than the grid width than its clipped  But all i want that whenever any empname that is bigger  THERE SHOULD BE ONE HORIZONTAL SCROLL BAR.

so how to achieve this ???

Please help !!



With Regards
Adesh

1 Answer, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 27 Aug 2013, 11:47 AM
Hi Adesh,

In order to achieve only horizontal scroll bar and RadGrid resizes by height depending on records height you can set the following client settings:

ASPX:

<ClientSettings>
    <Scrolling AllowScroll="true" ScrollHeight=""/>
</ClientSettings>

Here, the ScrollHeight  property is set to an empty string and that's all you need to do.

You can also refer to these help topics for more information:

1. Height vs. ScrollHeight

2. Resizing Grid with Scrolling when Data is Less Than Scroll Height

Please find attached a sample project that illustrates the approach.

I hope this helps.

Regards,
Venelin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
General Discussions
Asked by
Adesh
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Share this question
or