RC Table with height=100% disappears

Hi JDev gang
Under JDev 11g TP2, I've an issue with the RC table control.
I've dragged and dropped a VO data control onto my page and created an <af:table>. I've then placed the <af:table> inside an <af:panelCollection> with defaults values. If I change the panelCollection's height to 100%, at runtime the table does not render inside the browser. However if I set it to a pixel height it works fine.
My code as follows:
<af:panelCollection inlineStyle="height:100%;">
  <af:table ..... all the usual table attribute suspects>
  </af:table>
</af:panelCollection>As a side note, setting the panelCollection's width = 100% works fine.
Any idea what's going on?
Regards,
CM.

Hi Chris,
This is a common frustration I have seen with web browsers. Percentage based heights are not reliable.
I see there is a release note that specifically addresses this at:
http://www.oracle.com/technology/products/jdev/htdocs/11tp/readme.html#faces2
Scroll down to the "Page Layout Tips" section for a good explanation of how to avoid using percentage-based heights.
Regards,
Matt

Similar Messages

  • Creating a selectable HTML table with Sahrepoint list data dind

    Hi All,
    I m creating an app for sharepoint2013 , on my app I want to read data from SP list and display on something like HTML table/ grid view.
    What I have done is as follows.
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="TermList">
                        <thead>
                            <tr>
                                        <th>Start Date</th>
                                <th>End Date</th>
                                <th>Term Type(s)</th>
                                <th>Specialty</th>
                                <th width="12%">Sub Specialty</th>
                            </tr>
                        </thead>
                                            <tbody>
                            </tbody>
    </table>
    var context = SP.ClientContext.get_current();
    var user = context.get_web().get_currentUser();
    var Termsitems, web, hostcontext, currentusertitle;
    var hosturl;
    (function () {
    $(document).ready(function () {
        gethostdata();
        getUserName();
        $('#TermList').dataTable(
                        "sScrollY": 200,
                            This will enable jQuery UI theme
                        "bJQueryUI": true,
                            will add the pagination links
                        "sPaginationType": "full_numbers"
        getTermdetails();
    function gethostdata() {
        hosturl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
        context = new SP.ClientContext.get_current();
        hostcontext = new SP.AppContextSite(context, hosturl);
        web = hostcontext.get_web();
        context.load(web, 'Title');
        context.executeQueryAsync(onSiteLoadSuccess, onQueryFailed);
    function onSiteLoadSuccess(sender, args) {
        //   alert("site title : " + web.get_title());
    function onQueryFailed(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
    function getQueryStringParameter(urlParameterKey) {
        var params = document.URL.split('?')[1].split('&');
        var strParams = '';
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split('=');
            if (singleParam[0] == urlParameterKey)
                return decodeURIComponent(singleParam[1]);
    // This function prepares, loads, and then executes a SharePoint query to get the current users information
    function getUserName() {
        context.load(user);
        context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
    // This function is executed if the above call is successful
    // It replaces the contents of the 'message' element with the user name
    function onGetUserNameSuccess() {
    currentusertitle= user.get_title();
      $('#message').text('Hello ' + user.get_title());
    // This function is executed if the above call fails
    function onGetUserNameFail(sender, args) {
        alert('Failed to get user name. Error:' + args.get_message());
    function getTermdetails() {
        var Termlist = web.get_lists().getByTitle("TraineeTermsSPlist");
        context.load(Termlist)
        var camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Title" />' +
                                 '<Value Type="Text"> + currentusertitle + </Value></Eq></Where></Query></View>');
        Termsitems = Termlist.getItems(camlQuery);
        context.load(Termsitems);
        context.executeQueryAsync(getTermdetailsQuerySuccsess, getTermdetailsQueryFails)
    function getTermdetailsQuerySuccsess(sender, args) {
        var listEnumerator = Termsitems.getEnumerator();
        var datatable = document.getElementById("TermList");
        while (listEnumerator.moveNext()) {
            var oListItem = listEnumerator.get_current();
            var startdate = listEnumerator.get_current().get_item('startdate');
            var enddate = listEnumerator.get_current().get_item('Enddate');
            var termtype = listEnumerator.get_current().get_item('TermType');       
            var Specialty = listEnumerator.get_current().get_item('Specialty');
            var Specialty = listEnumerator.get_current().get_item('Subspecialty');
            $("#TermList").append("<tr align='middle'  class='gradeA'>" +
                                      "<td align='left'>" + startdate +
    "</td>" +
                                      "<td align='left'>" + enddate + "</td>"
    +
                                      "<td align='left'>" + termtype + "</td>"
    +
                                      "<td align='left'>" + Specialty +
    "</td>" +
                                      "<td align='left'>" + Specialty +
    "</td>" + "</tr>");
    function getTermdetailsQueryFails(sender, args) {
        alert(' Error:' + args.get_message());
    Now what I want to do is allow user to select rows on the table. Once they select a row I want to get that selected row and search SP list based on the selected value.  Also I would like to make this table with search area to search records.
    Can someone please help me to do this, or are there any easy way to do this. Sample code or useful link much appreciate.
    Thank you very much.
    d.n weerasinghe

    Instead of writing in dive each and every time directly,
    just have a div in html, and inside the while loop
    write and store in the variable like
      output += "<li><a href='#' style='display:none'>" + usernames[i] + " </a> "
                         + "<table id='results' width='100%'>"
                         + "
    <tr style='border-bottom:1px silver solid;'>"
                         + "
    <td style='width:60px;height:70px;' >"
                         + "
    <img alt=\"profile pic\" src= '" + pictureuri[i] + "'  style='width:60px;height:60px;'/>"
                         + "
    </td>"
                         + "
    <td >"
                         + "
    <table style='height:100%'>"
                         + "
    <tr>"
                         + "
    <td style='padding-padding-vertical-align:top;height:10px' >"
                         + "
    <a href='" + personaluri[i] + "' classq='ms-bold ms-subtleLink' style='color: gray; font-size: 12px; font-weight: bold;'>" + tempnames[i] + "</a>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    <tr>"
                         + "
    <td  style='padding-vertical-align:top;height:50px;color:#ADAEAD;font-size:14px;' >" + deptNames[i]
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    </table>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "</table>"
                         + "</li>"
    and finaly oyutside the loop 
    $(#div).html(output);

  • 100% height table with bg image

    I need to have a table that is centred and fills 100% height only in the browser. In it will be a background image. Can anyone tell me how to do this? I need to do it as soon as possible as the client has just changed their mind after I completed the job.

    Code below, taken from link below, if youre inclined to want to read about how to do it:
    http://apptools.com/examples/tableheight.php
    CODE:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
      html, body, #wrapper {
          height:100%;
          margin: 0;
          padding: 0;
          border: none;
          text-align: center;
       #wrapper {
          margin: 0 auto;
          text-align: left;
          vertical-align: middle;
          width: 400px;
    </style>
    </head>
    <body>
    <table id="wrapper" border="0" cellspacing="0" cellpadding="0">
          <tr>
             <td>This is centered</td>
          </tr>
       </table>
    </body>
    </html>

  • Horizontal scrolling with a table that is 100% width of window/container

    Hello,
    I'm a bit perplexed - it seems to me that the only way that I can have both fixed and scrollable columns in a table, with a table that resizes to the width of the user's screen, is to have percentage widths for all the entries.
    Warning imminent rant
    This seems to me to almost defeat the purpose. I want to be able to show more columns if the user has a large screen, and less if they have a small screen, keep certain key fields always showing and have the space avaliable for each column fixed to the size of the column contents. Having percentages of the screen for all columns just means that the column will get wider and thinner, not more or less!
    Is there any hope that this might come along with client side scrolling in NetWeaver EhP2? Or does anyone have a cunning solution to the problem?
    Now, I can sort of understand why this functionality has been build like this (the ABAP not having any real idea of how wide the screen actually is) - but why deliever such a solution at all? I can almost understand a fixed width situation, although all that code for a minimal improvement over just specifying the number of scrollable columns is suprising - but I struggle to see the use case for setting all the columns in a table to display as percentage widths.
    Rant over -
    If anyone does have any ideas how to have a 100% width table with fixed width columns - please do let me know.
    Cheers,
    Chris

    Can this work:
    Emebed your table UI element in Transparent Container UI element ( give it a fixed width ), now make table width as 100 % and make each column width as Width of Transparent Container / No of Columns.
    Although I'm suggesting this but in my opinion giving fixed width to any UI element height width property is not advisable and recommended. It is because when browser will be resized by the user then if there is a fixed width settings then scrollbars would appear and layout may also go haywire.
    If on the other hand if we are giving % (relative of window ) in width height of UI elements then layout will be adjusted automatically.
    Regards
    Manas Dua

  • Repeat header's column in a table with row height that greater then 200px

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I develop a website and encounter some problem about web page printing. I try to repeat header's column in a table with row's height that greater than or equal to 198px, but it doesn't work. Another size that lower than 198px works fine. If somebody has seen this issue before and know a solution, please help me. Thanks in advance.
    == This happened
    ==
    Every time Firefox opened
    == Firefox version
    ==
    3.6.6
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
    == Plugins installed
    ==
    *-6.0.12.1739
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *PDF-XChange Viewer Netscape Gecko Plugin
    *Default Plug-in
    *Shockwave Flash 8.0 r22
    *Adobe Shockwave for Director Netscape plug-in, version 11.0
    *3.0.40624.0
    *Office Live Update v1.3
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    *Npdsplay dll
    *DRM Store Netscape Plugin
    *DRM Netscape Network Object

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    [http://forums.mozillazine.org/viewforum.php?f=25]
    You'll need to register and login to be able to post in that forum.

  • Why updates on some tables with always on synchronize mode take * 100 than when asynchronize mode

    I have Always-On synchronization on some databases, We want to change from asynchronize mode to synchronize mode, I tested to see what the  change in performance between the two, and found that in general the select statements keep the same
    duration with and without synchronize mode, most of the update\insert usually take around * 4 times from the asynchronize mode, BUT some updates take much longer. I would like to understand why things take MUCH longer (I understand that working with synchronize
    mode is a 2 phase commit and should take * 4 times, but I can't understand why some of them take 50 - 100 times more).
    1. One query is an update made on a table with few records (up to 40 records), this update run 250K times a day, and a very simple update on this table takes * 98 than without synchronize mode
    1. An update on a big table with 2 million records, using a query that specify the unique column in the primary cluster key, takes 50 times more.
    What are  the factors that have dramatic influence on performance when 2 phase commit (asynchronize mode) is used?

    I've never even looked at the details for SQL Server, but on any kind of a system doing synchronous updates, you have to figure there is a fixed cost, a variable cost, and a queuing cost.  The fixed cost always hits whether its a big transaction or
    a small transaction, let's guess it's about 0.1 seconds for a round trip.  Variable cost depends on how much is updated, let's say it's linear, and is maybe 0.05 seconds for a couple of small rows.  The queuing cost varies from 0 to huge.
    So if you have a small transaction on a local system that takes 0.05 seconds (50 milliseconds), then just one will incur the local 0.05, plus 0.10, plus 0.05, and zero queuing cost, so 0.05 -> 0.20, about 4x.
    But if you have something that runs 250k times a day I hope it's faster, maybe it's only 0.01 seconds locally, and that turns to 0.01 + 0.10 + 0.01 + q, so 0.01 -> 0.12+q, so it's at *least* 12x slower, and maybe if you get 100 of them
    in the same second you start incurring queuing delays also, in fact you may have similar queuing delays on the local system and remote system besides any communications queuing, but if just the synchronization system has some queuing limits and it even gets
    to 0.30 seconds then 0.01 -> 0.42, or 42x, and you start seeing what can happen.  If your local transaction is only 0.001 seconds when not synchronized, then you'd have 100x slowdown just on the fixed overhead!
    IOW, synchronized systems and tons of small, fast transactions just don't fit together very well.
    HTH,
    Josh

  • [BUG?] inlineStyle="height:100%;" doesn't work for dvt:graph with firefox

    Hi,
    Using TP4 with Firefox 2.
    Have dvt:graph with dynamicResize="DYNAMIC_SIZE" and following inlineStyle:
    inlineStyle="width:100%;height:200px;" --> This works as expected and width of graph is resized when I resize the browser window.
    inlineStyle="width:100%;height:100%;" --> At runtime the browser window is empty.
    inlineStyle="width:200px;height:100%;" --> At runtime the browser window is empty.
    Here the full code:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document binding="#{backing_graph.document1}" id="document1">
          <af:messages binding="#{backing_graph.messages1}" id="messages1"/>
          <af:form binding="#{backing_graph.form1}" id="form1">
            <dvt:graph id="graph1" value="#{bindings.PhoTestView11.graphModel}"
                       binding="#{backing_graph.graph1}"
                       clickListener="#{backing_graph.processClick}"
                       dynamicResize="DYNAMIC_SIZE"
                       inlineStyle="width:200px;height:100%;"/>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_graph-->
    </jsp:root>regards
    Peter

    Hello Frank,
    It's an FF (tested with 2.0.0.16 and 3.0.1) specific problem. With IE7 it works as expected.
    regards
    Peter

  • Tables set at 100% within the width of a website throw everything out and spread across the browser screen - only with Mozilla Firefox so why?

    If corrective changes are going to be needed to the websites, it will be a time-consuming job. I feel this must be a weakness in MF as it doesn't occur with other browsers.

    Seems to be caused by the width="100%" for that table. That 100% is taken from the width on the outer table that is almost full screen width.<br />
    You can see that with the DOM Inspector.
    DOM Inspector: https://addons.mozilla.org/firefox/addon/6622
    <pre><nowiki><table width="100%" border="0" align="left" cellpadding="3">
    </nowiki></pre>

  • Error While mapping table with 100 Columns

    Hello
    Actually i had a requirement in which i have to map the data into target table from more than 50 tables with complex join conditions
    So I created 5 maps separately to load the data and now i am feared that while i deploy the the first map the other columns which doesnt have a map
    will be filled with nulls and some of the columns have unique constraint on it so its giving me error
    Please Help me out i need to submit my Assignment by Monday
    Thanks
    Sriks

    Bharadwaj Hari wrote:
    Hi,
    I agree with u...I am not sure of the environment the user has so i put forth all the 3 option that crossed my mind that time....thats why i said he has to choose what best suits him/her...
    Also if the database is huge and we create physical temp tables (option 2 and ur idea) its like having redundant data in the database which is also a problem....So ist upto the user to actually evaluate the situation and come up with what best suits him/her...
    Regards
    BharathHi,
    I understand your opinion. But I am not sure that the user have enough experience to choose the best option by his one. And about the redundant data: because of this I wrote that he should truncate the tables after the last mapping which loads all data into the real target table.
    Regards,
    Detlef

  • General Scenario- Adding columns into a table with more than 100 million rows

    I was asked/given a scenario, what issues do you encounter when you try to add new columns to a table with more than 200 million rows? How do you overcome those?
    Thanks in advance.
    svk

    For such a large table, it is better to add the new column to the end of the table to avoid any performance impact, as RSingh suggested.
    Also avoid to use any default on the newly created statement, or SQL Server will have to fill up 200 million fields with this default value. If you need one, add an empty column and update the column by using small batches (otherwise you lock up the whole
    table). Add the default after all the rows have a value for the new column.

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • Opening file present in treeview by clicking on it within a table? I had created a table with a row and two columns. in one column i had dislayed treeview and want that if i click on the file in treeview it gets opened in other column. Can this happen?

    I also got a code in some website related to my problem but there are errors in this code that i am not able to understand can you correct those errors:
    using System;
    using System.IO;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using Microsoft.Web.UI.WebControls;
    namespace shark.TreeView
    /// <summary>
    /// Summary description for DocTree.
    /// </summary>
    public class DocTree : System.Web.UI.Page
    protected Microsoft.Web.UI.WebControls.TreeView TreeCtrl;
    public DocTree()
    Page.Init += new System.EventHandler(Page_Init);
    private void Page_Load(object sender, System.EventArgs e)
    if ( ! this.IsPostBack )
    // add tree node "type" for folders and files
    string imgurl = "/shark/webctrl_client/1_0/Images/";
    TreeNodeType type;
    type = new TreeNodeType();
    type.Type = "folder";
    type.ImageUrl = imgurl + "folder.gif";
    type.ExpandedImageUrl = imgurl + "folderopen.gif";
    TreeCtrl.TreeNodeTypes.Add( type );
    type = new TreeNodeType();
    type.Type = "file";
    type.ImageUrl = imgurl + "html.gif";
    TreeCtrl.TreeNodeTypes.Add( type );
    // start the recursively load from our application root path
    // (we add the trailing "/" for a little substring trimming below)
    GetFolders( MapPath( "~/./" ), TreeCtrl.Nodes );
    // expand 3 levels of the tree
    TreeCtrl.ExpandLevel = 3;
    private void Page_Init(object sender, EventArgs e)
    InitializeComponent();
    // recursive method to load all folders and files into tree
    private void GetFolders( string path, TreeNodeCollection nodes )
    // add nodes for all directories (folders)
    string[] dirs = Directory.GetDirectories( path );
    foreach( string p in dirs )
    string dp = p.Substring( path.Length );
    if ( dp.StartsWith( "_v" ) )
    continue; // ignore frontpage (Vermeer Technology) folders
    nodes.Add( Node( "", p.Substring( path.Length ), "folder" ) );
    // add nodes for all files in this directory (folder)
    string[] files = Directory.GetFiles( path, "*.aspx" );
    foreach( string p in files )
    nodes.Add( Node( p, p.Substring( path.Length ), "file" ) );
    // add all subdirectories for each directory (recursive)
    for( int i = 0; i < nodes.Count; i++ )
    if ( nodes[ i ].Type == "folder" )
    GetFolders( dirs[ i ] + "\\", nodes[i ].Nodes );
    // create a TreeNode from the specified path, text and type
    private TreeNode Node( string path, string text, string type )
    TreeNode n = new TreeNode();
    n.Type = type;
    n.Text = text;
    if ( type == "file" )
    // strip off the physical application root portion of path
    string nav = "/" + path.Substring( MapPath( "/" ).Length );
    nav.Replace( '\\', '/' );
    n.NavigateUrl = nav;
    // set target if using FRAME/IFRAME
    n.Target="doc";
    return n;
    #region Web Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    this.Load += new System.EventHandler(this.Page_Load);
    #endregion
    and the design that i got on website for the code that i displayed just above it is
    <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
    <%@ Page language="c#" Codebehind="DocTree.aspx.cs" AutoEventWireup="false" Inherits="shark.TreeView.DocTree" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    </HEAD>
    <body>
    <form id="DocTree" method="post" runat="server">
    <table height="100%" cellSpacing="0" cellPadding="8" border="0">
    <tr height="100%">
    <td vAlign="top">
    <iewc:treeview id="TreeCtrl" runat="server" SystemImagesPath="/shark/webctrl_client/1_0/treeimages/">
    </iewc:treeview>
    </td>
    <td vAlign="top" width="100%" height="100%">
    Click on any *.aspx page in the tree and it should load here <iframe id="doc" name="doc" frameBorder="yes" width="100%" scrolling="auto" height="100%">
    </iframe>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </HTML>
    This is my code for viewing treeview but it is not expanding plz help me in this also
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Data;
    using System.IO;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;
    using System.Media;
    using System.Drawing;
    using System.Drawing.Imaging;
    public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    if (Page.IsPostBack == false)
    System.IO.DirectoryInfo RootDir = new System.IO.DirectoryInfo(Server.MapPath("~/Files"));
    // output the directory into a node
    TreeNode RootNode = OutputDirectory(RootDir, null);
    // add the output to the tree
    MyTree.Nodes.Add(RootNode);
    TreeNode OutputDirectory(System.IO.DirectoryInfo directory, TreeNode parentNode)
    // validate param
    if (directory == null) return null;
    // create a node for this directory
    TreeNode DirNode = new TreeNode(directory.Name);
    // get subdirectories of the current directory
    System.IO.DirectoryInfo[] SubDirectories = directory.GetDirectories();
    // OutputDirectory(SubDirectories[0], "Directories");
    // output each subdirectory
    for (int DirectoryCount = 0; DirectoryCount < SubDirectories.Length; DirectoryCount++)
    OutputDirectory(SubDirectories[DirectoryCount], DirNode);
    // output the current directories file
    System.IO.FileInfo[] Files = directory.GetFiles();
    for (int FileCount = 0; FileCount < Files.Length; FileCount++)
    DirNode.ChildNodes.Add(new TreeNode(Files[FileCount].Name));
    } // if the parent node is null, return this node
    // otherwise add this node to the parent and return the parent
    if (parentNode == null)
    return DirNode;
    else
    parentNode.ChildNodes.Add(DirNode);
    return parentNode;
    This is my design
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    <style type="text/css">
    .auto-style2
    width: 412px;
    .auto-style3
    width: 174px;
    .auto-style4
    width: 743px;
    .auto-style5
    width: 506px;
    height: 226px;
    </style>
    </head>
    <body>
    <form id="form1" method="post" runat="server">
    <table align:"center" class="auto-style4" border="1" style="table-layout: fixed; border-spacing: 1px">
    <tr>
    <td class="auto-style3">
    <br />
    <br />
    <br />
    <br />
    </td>
    <td class="auto-style2">
    <br />
    <br />
    <br />
    <br />
    </td>
    </tr>
    <tr>
    <td class="auto-style3" valign="top">
    <asp:TreeView Id="MyTree" PathSeparator = "|" ExpandDepth="0" runat="server" ImageSet="Arrows" AutoGenerateDataBindings="False">
    <SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px" ForeColor="#5555DD"></SelectedNodeStyle>
    <NodeStyle VerticalPadding="0px" Font-Names="Tahoma" Font-Size="10pt" HorizontalPadding="5px" ForeColor="#000000" NodeSpacing="0px"></NodeStyle>
    <ParentNodeStyle Font-Bold="False" />
    <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD"></HoverNodeStyle>
    </asp:TreeView>
    </td>
    <td class="auto-style2">
    <base target="_blank" /> <iframe frameborder="0" scrolling="yes" marginheight="0" marginwidth="0"
    src="" class="auto-style5"></iframe>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Hi meghage,
    From your code, it is a WebForm project.
    This forum is to discuss problems of Windows Forms. Your question is not related to the topic of this forum.
    You can consider posting it in asp.net forum for supports . Thanks.
    ASP.NET: http://forums.asp.net
    Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can I replace my table with divs, in this context?

    Hi,
    I'm trying to accomplish something without the use of tables. Maybe someone can tell me how.
    - The skeleton is basically made up of 3 newspaper-style columns.
    - Their widths aren't very likely to change -- their widths will be fixed -- so this eliminates one problem right off the bat, right?
    - The first column (left) is a sidebar menu, and it has its own distinct background image pattern.
    - The other two columns (mid and right) share a flat background. Right now, I'm just calling the same 1k JPG twice (once in each of those two columns/cells). I find this simpler than creating an unnecessary container just for the common background.
    - All 3 columns begin at the same line (0).
    So far so good, the fixed widths and the fact that they all begin at y=0 makes this easier than it otherwise could have been.
    Now here's the tricky part :
    - The amount of content is different from page to page (some pages are longer than others), and the amount of content per column will also vary individually (so the sidebar might be the longest column in one file, the mid column could be the longest element in the next, and so on...)
    - The layout is horizontally centered.
    - All 3 columns need to end at the same spot, which will be dynamic from page to page (in other words, the backgrounds of these columns need to stretch/repeat until the end of the column with the most content, whichever of the 3 columns that may be on any given page).
    - There is a page-end image to display that is as wide as the combined 3 column widths.
    As you can imagine, using a table with 3 columns makes this easy as pie. But I was told to avoid tables whenever possible, so if there's an easy way to justapose 3 divs and have them behave like 3 cells of the same table -- without too much markup -- I'd give it a try, and potentially leave tables behind for good.
    It would be easy enough to create a large container div, horizontally center it, and left-float 3 divs inside it... but this doesn't address the problem of having to have those backgrounds repeat all the way to the end of the site. The way I just described, the backgrounds would vertically end wherever the content of that individual column ends.
    And since we know divs don't like height=100%, well...
    Any help would be appreciated.
    Thanks!

    Have you tried using Faux Columns?
    http://www.alistapart.com/articles/fauxcolumns/
    or Project Seven's Equal Height Columns script?
    http://www.projectseven.com/tutorials/css/pvii_columns

  • Img size height="100%" OK?

    I want my images to it in the viewer's window.
    Making the height="100%" does that. But only if I do not
    specify a width.
    It works in Safari on my Mac. Firefox displays the image in
    native size. Are there browsers that will distort the image?
    Here is my test page, using 97% for the height.
    http://tinyurl.com/rasxc
    Is there a way to do this with tables or div or ? Since all
    browsers don't work with img %s, perhaps my only choice is to wrap
    the image in a Flash movie.

    I agree... Sizing your images doesn't seem like a good idea
    at all..
    If you really "must" display your images this way, then I
    think the
    crash's take on it is quite good.
    Maybe there is also a javascript which would do the job, but
    I tend to
    stay away from js as the user may smiply have it disabled...
    Anurag
    crash wrote:
    > Why? What are you tryign to accomplish? THis is not a
    good way to size
    > images.
    >
    > The best way that I can think of would be to run aserver
    side script and get
    > the size of the user's viewport, then use PHP's GDI to
    manipulate your image
    > size.
    >
    > The way you're sizing that thing right now is ugly.
    You're just resizing
    > the display, nto the actual image.
    >
    >
    > "Wholeo" <[email protected]> wrote in
    message
    > news:eadk16$l5i$[email protected]..
    >> I want my images to it in the viewer's window.
    >> Making the height="100%" does that. But only if I do
    not specify a width.
    >> It works in Safari on my Mac. Firefox displays the
    image in native size.
    >> Are
    >> there browsers that will distort the image?
    >>
    >> Here is my test page, using 97% for the height.
    >>
    http://tinyurl.com/rasxc
    >>
    >> Is there a way to do this with tables or div or ?
    Since all browsers don't
    >> work with img %s, perhaps my only choice is to wrap
    the image in a Flash
    >> movie.
    >>
    >
    >

  • Dynamic Table with Random Records

    What I am trying to do is select random records from a table
    and display them in a dynamic table with max columns set to 3 and
    the 4th record to be on a new row. Below is what I have right now
    and it works to randomly pick records but has no function to set
    columns in a table. If there is an easier way feel free to let me
    know. I have tried various ways to do this but none seem to work.
    <CFQUERY NAME="getItems" DATASOURCE="absi">
    SELECT catfit.*, modcats.*, prodmat.*, prod.* FROM catfit,
    modcats,
    prodmat, prod WHERE prodmat.prodid=catfit.prodid And
    catfit.catid=modcats.catid
    ORDER BY modl ASC </cfquery>
    <cfif getItems.recordCount>
    <cfset showNum = 3>
    <cfif showNum gt getItems.recordCount>
    <cfset showNum = getItems.recordCount>
    </cfif>
    <cfset itemList = "">
    <cfloop from="1" to="#getItems.recordCount#"
    index="i">
    <cfset itemList = ListAppend(itemList, i)>
    </cfloop>
    <cfset randomItems = "">
    <cfset itemCount = ListLen(itemList)>
    <cfloop from="1" to="#itemCount#" index="i">
    <cfset random = ListGetAt(itemList, RandRange(1,
    itemCount))>
    <cfset randomItems = ListAppend(randomItems, random)>
    <cfset itemList = ListDeleteAt(itemList,
    ListFind(itemList, random))>
    <cfset itemCount = ListLen(itemList)>
    </cfloop>
    <cfloop from="1" to="#showNum#" index="i">
    <cfoutput>
    <table width="205" border="0" align="left"
    cellpadding="0" cellspacing="0">
    <tr>
    <td width="235" height="116"> <div
    align="center"><img
    src="../Products/ProductPictures/#getitems.pic[ListGetAt(randomItems,
    i)]#" width="100"></div></td>
    </tr>
    <tr>
    <td
    class="ProdTitle">#getitems.brand[ListGetAt(randomItems,
    i)]# #getitems.modl[ListGetAt(randomItems, i)]#</td>
    </tr>
    <tr>
    <td
    class="paragraph">$#getitems.prc[ListGetAt(randomItems,
    i)]#</td>
    </tr>
    <tr>
    <td><A
    href="../Products/details.cfm?prodid=#getItems.prodid[ListGetAt(randomItems,
    i)]#" class="linkcontact">more
    info</a></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </cfoutput>
    </cfloop>
    </cfif>

    To start a new row after 3 records, do something like this.
    <table>
    <tr>
    <cfoutput query="something">
    <td>#data#<td>
    <cfif currentrow mod 3 is 0>
    </tr><tr>
    </cfoutput>
    </tr>
    </table>
    You should also know that your approach is very inefficient
    in that you are bringing in to cold fusion more data than you need.
    First of all you are selecting every field from 3 tables when you
    don't appear to be using all of them. Second, you are selecting
    every record and you only want to use 3. There are better ways out
    there, but they are db specific and you did not say what you are
    using.

Maybe you are looking for