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

Scrolling problem of Grid

5 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ashish
Top achievements
Rank 1
Ashish asked on 30 Jun 2009, 11:33 AM







My grid

  • In master Table there are Many Columns…..all with fixed width
  • a Hierarchy-table(<DetailTables ><telerik:GridTableView >……)
  • fixed the width of the grid
  • enabled scrolling
  • has frozen cols

 

 

 

                                   

On browser  if we scroll to the last Column of the grid the Scroll-bar disappears!!!!..please HELP





---Code---




<telerik:RadGrid ID="grdSecuritySearchResults" Width="750px" runat="server" GridLines="None"
OnNeedDataSource="grdSecuritySearchResults_NeedDataSource"
ondetailtabledatabind="grdSecuritySearchResults_DetailTableDataBind"
AutoGenerateColumns="False" Skin="Office2007">
<MasterTableView Width="100%" ShowHeadersWhenNoRecords="true" AllowFilteringByColumn="True"
AllowMultiColumnSorting="True" AllowSorting="True" BorderColor="#3366FF"
BorderWidth="2px" GridLines="Both">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<DetailTables >
<telerik:GridTableView NoDetailRecordsText="Ashu" runat="server" Name="CashSteps" BorderColor="#00CC99"
BorderWidth="2px" GridLines="Both">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ReferenceNo" HeaderText="Reference Number" UniqueName="ReferenceNo">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FromCashPortfolio" HeaderText="From Cash Portfolio">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ToCashPortfolio" HeaderText="To Cash Portfolio"
SortExpression="ToCashPortfolio">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Currency" HeaderText="Currency" SortExpression="Currency">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Amount" HeaderText="Amount" SortExpression="Amount">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SettlementDate" HeaderText="SettlementDate"
UniqueName="ValueDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TransferStatus"
HeaderText="Trasnfer Status" UniqueName="TransferStatus">
</telerik:GridBoundColumn>
</Columns>

<HeaderStyle BackColor="#33CC33" Font-Bold="False" Font-Italic="False"
Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
Wrap="True" />

</telerik:GridTableView>
</DetailTables>

<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ReferenceNo" HeaderText="Reference Number" UniqueName="ReferenceNo">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Originator" HeaderText="Originator" UniqueName="Originator">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Category" HeaderText="Category" UniqueName="Category">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OneWayTwoWay" HeaderText="OneWayTwoWay" UniqueName="OneWayTwoWay">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TransferStatus" HeaderText="Transfer Status"
UniqueName="TransferStatus">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="TradeDate" HeaderText="Trade Date" UniqueName="TradeDate1">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="SettlementDate" FilterControlWidth="100px" HeaderText="Settlement Date"
UniqueName="SettlementDate">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />

</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="SecurityIdentifier" HeaderText="Security Identifier"
UniqueName="SecurityIdentifier">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ParAmountQuantity" HeaderText="Par Amount /Quantity"
UniqueName="ParAmountQuantity">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BookPrice" HeaderText="Book Price" UniqueName="BookPrice">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BookValue" HeaderText="Book Value" UniqueName="BookValue">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MarketPrice" HeaderText="Market Price" UniqueName="MarketPrice">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MarketValue" HeaderText="Market Value" UniqueName="MarketValue">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="AccruedInterest" HeaderText="Accrued Interest"
UniqueName="AccruedInterest">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TotalProceeds" HeaderText="TotalProceeds" UniqueName="TotalProceeds">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Currency" HeaderText="Currency" UniqueName="Currency">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SellPortfolio" HeaderText="Sell Portfolio" UniqueName="SellPortfolio">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SellLegalID" HeaderText="Sell Legal ID" UniqueName="SellLegalID">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SellSegmentCode" HeaderText="Sell Segment Code"
UniqueName="SellSegmentCode">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SellSettlementCode" HeaderText="Sell Settlement Code"
UniqueName="SellSettlementCode">

<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BuyPortfolio" HeaderText="Buy Portfolio" UniqueName="BuyPortfolio">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BuyLegalID" HeaderText="Buy Legal ID" UniqueName="BuyLegalID">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BuySegmentCode" HeaderText="Buy Segment Code"
UniqueName="BuySegmentCode">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BuySettlementCode" HeaderText="Buy Settlement Code"
UniqueName="BuySettlementCode">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TradingPhilosophyCGAAPFrom" HeaderText="Trading Philosophy CGAAP From"
UniqueName="TradingPhilosophyCGAAPFrom">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TradingPhilosophyCGAAPTo" HeaderText="Trading Philosophy CGAAP To "
UniqueName="TradingPhilosophyCGAAPTo">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TradingPhilosophyUSGAAPFrom" HeaderText="Trading Philosophy USGAAP From"
UniqueName="TradingPhilosophyUSGAAPFrom">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TradingPhilosophyUSGAAPTo" HeaderText="Trading Philosophy USGAAP To"
UniqueName="TradingPhilosophyUSGAAPTo">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" UniqueName="Priority">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InvestmentDesk" HeaderText="Investment Desk"
UniqueName="InvestmentDesk">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />

</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Portfolio Manager" HeaderText="Portfolio Manager"
UniqueName="PortfolioManager">
<HeaderStyle Width="120px" />
<ItemStyle Width="120px" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>

<ClientSettings>
<Scrolling AllowScroll="True" FrozenColumnsCount="1" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 03 Jul 2009, 07:42 AM
Hello Ashish,

If I understood you correctly, when you scroll to the last column using the horizontal scroll bar, the vertical scroll bar disappears. If my assumption is correct, the reason for this is that RadGrid calculates its row height base on the data inside the cells. The behavior you are getting is due to the fact that you have data that wraps in more than 1 row in the first columns, where as the last columns do not have wrapping data. This causes the last columns to resize accordingly. As a result the total height of the rows in the master table become less than the total height of the rows at the beginning. This is why the vertical scroll bar disappears, as now your rows do not go heigher than your master table width.

If you want all your rows to have the same height, you can set the respective properties of the respective GridTableView (MasterTableView):

<HeaderStyle Height="40px" />
<ItemStyle Height="50px" />
<AlternatingItemStyle Height="50px" />

You should now have equal height in all portions of the table.

Best wishes,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Appu
Top achievements
Rank 1
answered on 03 Jul 2009, 09:47 AM
Hello Veli,
            I have the same problem scrollbar disappers, i gave the styles as u defined, but still it didnt work, i didnt give Grid width and MasterTabale width but I defined fixed width to all of my columns like 100px,75px etc. also enabled itemstyle Wrapper true to a all of columns. But still i cannot get a good format for grid in hiding/unhiding columns ans also Scrollbar disppears the column headers appends when hiding.

Plz direct me to the right direction

Appu
0
Ashish
Top achievements
Rank 1
answered on 03 Jul 2009, 10:36 AM
the horizontal scroll bar disapears ...its a bit upredictable(some times scroll bar is not disapearing...??) i dont kno what is causeing the problem. i will reply to you with more details soon..
thanx, 
0
ALAN NEMARIC
Top achievements
Rank 1
answered on 26 Oct 2009, 06:07 AM
did that horizontal scroll problem get solved..
mail me at ashish.chougule@patni.com
0
Veli
Telerik team
answered on 28 Oct 2009, 12:53 PM
Hi guys,

The only option that works for now is explicitly settings Height of your column cells to some value in pixels that is sufficient for all wrapping cells.

Regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Ashish
Top achievements
Rank 1
Answers by
Veli
Telerik team
Appu
Top achievements
Rank 1
Ashish
Top achievements
Rank 1
ALAN NEMARIC
Top achievements
Rank 1
Share this question
or