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

scrolling

5 Answers 305 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 16 May 2008, 11:54 PM
i have been messing with this all day, and cannot get my grid to look how i want it to. basically, i want horizontal scroll bars, but not vertical. i don't want my data to wrap. the following is close, but the vertical scroll bar still appears for the default height. the horizontal bar appear correctly, but it also causes the width of the table itself on the page to extend to the 'true' width of the grid (as if the scroll bar was not there), causing a horizontal scroll bar to also appear in the browser. here is my current configuration. The 'scrollheight' of 100% does not seem to work.

thanks,
susan

<

telerik:RadGrid ID="SubGrid" AllowSorting="True" Skin="Hay" runat="server" GridLines="none" Width="985px">

<ClientSettings EnableRowHoverStyle="true">

<Selecting AllowRowSelect="true" />

<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="100%"/>

</ClientSettings>

<MasterTableView AutoGenerateColumns="False" DataKeyNames="VendorKey" TableLayout="auto" Width="100%" >

<Columns>

<telerik:GridHyperLinkColumn HeaderText="Subcontractor" DataTextField="VendorName" ItemStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType" HeaderText="Trade 1" ItemStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType2" HeaderText="Trade 2" ItemStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType3" HeaderText="Trade 3" ItemStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="MainPhone" HeaderText="Main Phone" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactName" HeaderText="Contact Name" ItemStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactPhone" HeaderText="Contact Phone" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactCell" HeaderText="Contact Cell" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ShowToCustomer" HeaderText="Show Cust?" ItemStyle-HorizontalAlign="center" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="GeneralLiabilityExpiration" HeaderText="GL Expiration" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="AutoInsuranceExpiration" HeaderText="Auto Expiration" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="Status" HeaderText="Status"/>

<telerik:GridTemplateColumn UniqueName="SubNotes" HeaderText="Notes" ItemStyle-HorizontalAlign="center">

<ItemTemplate>

<asp:Image TabIndex="-1" id="imgNotes" AlternateText="Notes" imageUrl="../images/notes.gif" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 17 May 2008, 12:45 PM
Hi Susan,

The ScrollHeight property should be set in pixels. Can you please give that a try?

Also note that the MasterTableView TableLayout values are Fixed and Auto (case-sensitive). Do you get the problem on IE or Firefox? Is there a difference on both browsers.

Please, take a look at the article here for additional info and let us know if further assistance is needed.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 17 May 2008, 01:05 PM
i don't want the vertical scroll bar to appear at all. if i set a massive pixel amount for the scroll height, i can get the bar to go away, but then i hav all this blank space at the bottom, as i don't know how 'high' my grid is going to be since it is based on the data returned. i just want to use the ie browser scroll bar and not have a scroll bar within a scroll bar. is there a way to do this?
0
Susan
Top achievements
Rank 1
answered on 18 May 2008, 05:59 PM

i'm concentrating on the horizontal aspect at this time. using firefox, i have the grid displaying and adjusting to the size of the browser resolution accordingly. however, if i set the wrap values on the text and headings, the data in the grid gets shifted so it is no longer left-justified under the appropriate column. also, when you click to sort, all the columns jump to the right and they are no longer under their heading. here is my grid layout:

<

telerik:RadGrid ID="SubGrid" AllowSorting="True" Skin="Hay" runat="server" GridLines="None">

<ClientSettings EnableRowHoverStyle="true">

<Selecting AllowRowSelect="true" />

<Scrolling AllowScroll="true" UseStaticHeaders="true"/>

</ClientSettings>

<MasterTableView AutoGenerateColumns="false" DataKeyNames="VendorKey" TableLayout="Auto">

<Columns>

<telerik:GridHyperLinkColumn HeaderText="Subcontractor" DataTextField="VendorName" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType" HeaderText="Trade 1" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType2" HeaderText="Trade 2" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="VendorType3" HeaderText="Trade 3" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="MainPhone" HeaderText="Main Phone" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactName" HeaderText="Contact Name" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactPhone" HeaderText="Contact Phone" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ContactCell" HeaderText="Contact Cell" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="ShowToCustomer" HeaderText="Show Cust?" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="GeneralLiabilityExpiration" HeaderText="GL Expiration" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="AutoInsuranceExpiration" HeaderText="Auto Expiration" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridBoundColumn DataField="Status" HeaderText="Status" ItemStyle-Wrap="false" HeaderStyle-Wrap="false"/>

<telerik:GridTemplateColumn UniqueName="SubNotes" HeaderText="Notes" ItemStyle-HorizontalAlign="center" HeaderStyle-Wrap="false" ItemStyle-Wrap="false">

<ItemTemplate>

<asp:Image TabIndex="-1" id="imgNotes" AlternateText="Notes" imageUrl="../images/notes.gif" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>

0
Konstantin Petkov
Telerik team
answered on 20 May 2008, 11:10 AM
Hi Susan,

If you don't need to vertical scrollbar, you can remove the static headers feature as well. Note also that TableLayout "Auto" is not fully functional in Firefox. I's suggest you set fixed layout instead.

My suggestion also would be to try the paging feature in your case. I don't get the unexpected shifting and alignment problems, though. Find attached an example close to the markup you've posted and let me know if that helps. You can use it as reference to let us know how the problems can be reproduced.

Note, I've tested with the latest official RadGrid for ASP.NET AJAX labeled 2008_1_515.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Azad
Top achievements
Rank 1
answered on 05 Nov 2008, 02:49 PM
Hi Susan,

Maybe you have already solved your problem but if not here's sollution for your question.

-Disable scrolling in your RadGrid.
-Build a "div" around your RadGrid like below
    

<

 

div style="overflow-x: scroll">

 

    <

 

telerik:RadGrid  />

 

</

 

div>

 

 

 

It should work.

Best wishes,
Azad

Tags
Grid
Asked by
Susan
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Susan
Top achievements
Rank 1
Azad
Top achievements
Rank 1
Share this question
or