Create sortable dynamic table header

I have a webpage .ASP that connects to a database by system ODBC connection.  How can I make my dynamic table have clickable header text to sort the column in ascending or descending order?
Dreamweaver CS3
Thanks

If you do it server-side, the page will need to reload every time you
sort. You could do it client side, with a bit of script, as we've done
on our updates page (after several suggestions to do so from a customer
who posts regularly on this forum
http://www.projectseven.com/support/updatepages/
Al Sparber - PVII
http://www.projectseven.com
The Finest Dreamweaver Menus | Galleries | Widgets
Since 1998

Similar Messages

  • How to create a dynamic table region with dynamic VO in processFormRequest

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi
    Edited by: Myvizhi Selvi on May 20, 2013 6:21 PM

    Hi,
    You can use following sample code to create advance table columns dynamically with colum groups as well.
    It assumes that you have already created advance table with ID EmpTblRN.
    Below code returns column heading dynamically and if you keep your VO column names and attributes
    same in all the cases (COL1, COL2.....) then you can easily use a loop to create advance table columns.
    It is attaching VO attributes to OAMessageStyledText bean in the last.
    Hope it helps.
    OAAdvancedTableBean advTable = (OAAdvancedTableBean)webBean.findChildRecursive("EmpTblRN");
    Serializable [] param = {currentWindowSeq.toString()};
    Datum[] colHeadingArray = (Datum[])am.invokeMethod("getColumnHeading", param);
    String oldGrpName = null;
    String newGrpName = null;
    OAColumnGroupBean columnGroup = null;
    DictionaryData columnFormat = new DictionaryData();
    columnFormat.put(WIDTH_KEY, "4%");
    for (int i = 0; i < colHeadingArray.length; i++)
    try
    oracle.sql.STRUCT os = (oracle.sql.STRUCT)colHeadingArray;
    Object[] colHeadAttr = os.getAttributes();
    newGrpName = (String)colHeadAttr[0];
    if(newGrpName!=null)
    if(!newGrpName.equals(oldGrpName))
    // Create a column group, create the set the column header,
    // and add the column group under the advanced table
    columnGroup = (OAColumnGroupBean)createWebBean(pageContext, COLUMN_GROUP_BEAN, null, "ColGroup"+i);
    OASortableHeaderBean columnGroupHeader = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "ColGroupHeader"+i);
    columnGroupHeader.setText(newGrpName);
    // Retrieve from message dictionary
    columnGroup.setColumnHeader(columnGroupHeader);
    advTable.addIndexedChild(columnGroup);
    oldGrpName = newGrpName;
    // Create a column, create the set the column header, and add the column
    // under the column group
    OAColumnBean column1 = (OAColumnBean)createWebBean(pageContext, COLUMN_BEAN, null, "Column"+i);
    OASortableHeaderBean column1Header = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "Column1Header"+i);
    column1Header.setText(colHeadAttr[1].toString());
    column1.setColumnHeader(column1Header);
    column1.setColumnFormat(columnFormat);
    columnGroup.addIndexedChild(column1);
    // Create the actual leaf item under the first column
    OAMessageStyledTextBean leaf1 = (OAMessageStyledTextBean)createWebBean(pageContext, MESSAGE_STYLED_TEXT_BEAN, null, "Leaf"+i);
    //OARawTextBean leaf1 = (OARawTextBean)createWebBean(pageContext, RAW_TEXT_BEAN, null, "Leaf"+i);
    leaf1.setViewAttributeName("Week"+(i+1));
    String destination = "OA.jsp?page=/xxqc/oracle/apps/per/leaveadvance/webui/EmployeeLeaveDetailPG&personId={@PersonId}";
    destination = destination + "&startDate="+colHeadAttr[1].toString()+"-"+(String)colHeadAttr[0];
    destination = destination + "&addBreadCrumb=Y&retainAM=Y";
    leaf1.setDestination(destination);
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(leaf1,"Color"+(i+1));
    //leaf1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    leaf1.setAttributeValue(UIConstants.RENDERED_ATTR, cssjob);
    column1.addIndexedChild(leaf1);
    catch(Exception e)
    System.out.println("e"+e);

  • How to create a dynamic table region with dynamic VO

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

  • How to create a Dynamic table without knowing fieldcat size

    Hi all, i'm trying to insert a (Jointer) of 3 selections form diffrent tables in an other dynamic table but i dont know the size of my final table, so i dont know how to create a fieldcatalog.
    Can we create an internal table with those caractiristics ????

    Hi,
    If you know which fields (ABAP Dictionary) you're selecting then you know their size; use the following FM call: DD_NAMETAB_TO_DDFIELDS
    Then you can use the following method to create your dynamic table: cl_alv_table_create=>create_dynamic_table
    Arash

  • Javascript error occurred when create a dynamic table

    Hi all,
    I try to create a dynamic table using the created recordset,
    but I get the javascript error message "While executing insertObject in DynamicTable.htm, a Javascript error occurred."
    How to fix it? I tried to delete the cache file in Configuration folder but it is not work..
    Any idea? Thanks a lot!

    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Try 12 & 4 and then go through the rest.

  • How to create a dynamic table were the JTable columns keep varying

    How to create a dynamic table were the JTable columns keep varying based on the input to the jtable

    Oooh, I lied. DefaultTableModel has an API for adding and
    removing columns. I didn't know that. You should have read
    the API.
    As for preferring to extend AbstractTableModel rather than
    DefaultTableModel, I think it's more correct. DefaultTableModel
    is a simple implementation of Abstract for basic cases. It isn't
    intended to be extended. I figure most people extending
    DefaultTableModel are also extending JFrame, JPanel, and Thread
    instead of encapsulating the first two and implementing
    Runnable for the third.

  • Creating a Dynamic table

    Could anyone please help me,
    how to create a dynamic table. That is a table where the user can insert his own text.
    thanks

    Well quicly you can create a jtable whose fields in each columns are editable.
    I use sun's forte to do that.

  • How to use JSTL create a dynamic table according to a database???

    How to use JSTL create a dynamic table according to a database in a web page? Who can help me? Thanks.

    How to use JSTL create a dynamic table according to a
    database in a web page? Who can help me? Thanks.???
    Could you rephrase your quesion?
    Do you want to display records by reading from a table in DB?

  • How to create a dynamic table (repeating) with static header?

    Hello
    My purpose is to create a table which should be dynamically filled at runtime depending on the number of elements in the datasource($record.list). If the list is empty, the table shouldn't be displayed at all.
    I created a subform which holds a table, ticking "Repeat Subform for each data item" and I set the binding of the table elements to $record.list[*].myelement. This works fine so far.
    For the table header I created a second subform with a table having exactly the same size like the other table with text fields that contain the table header texts.
    My problem now is that I would like to control the display of the subform which serves as table header row depending on whether $record.list is empty or not.
    What's the best way to do this? How can I have access to the datasource for a form?
    Thank you very much for your help!!!
    Best regards
    Bettina Hepp

    Hi,
    Instead of creating the header row outside the table.
    Create it inside the same table as header row.
    So when you create a condition then automatically applicable for the header row also.
    This is the best option.
    Regards,
    sasi

  • Dynamic table header/footer on multiple pages stay original

    hi experts,
    i've got a form with a dynamic table. this means that i have a footerrow with mapped information if it should be visible or not. so the table can have from 1 to 40 columns.
    i did some scripting in the table's initialize section:
    loop over count of colums and set the headerrow, row1 and footerrow elements for index x to hidden.
    everything works out fine BUT if the data spans over multiple pages the headerrow on pages 2 to last is original again. means that the hiding of cells is not effective any more. same with footerrow (but here its fine at last page and original at  page 1 to last -1).
    i tried to hide cells again in layout:ready section for the other instances of the headerrow.
    cells got hidden, but the still visible cells didnt relocate to the left (if i hide it, there should be no space between staying cells).
    can anyone please give me a hint what i am missing here?
    does anyone have a simple sample for this task? its all about the header/footer for multiple pages!
    thanks a lot!
    daapoo

    When the footer goes to the 2nd page the page subform is incremented so you will have to reference the page subform as well. I suggest that you add a button (this is for a test only) to the footer subform and add the code app.alert(this.somExpression). Now render the form and make sure the footer stays on one page. Hit the button and take note of the someExpression. Now add enough rows to force the footer to a new page. Hit th ebutton again and take note of the changed somExpression. So to solve your problem you will have to find out which page your footer is on. and then construct your expression to incorporate this chane in expression. Note that the indexes are 0 based but the page numbering is 1 based.
    Hope that helps
    Paul

  • How do I create a dynamic table in the form for auto field detection?

    I am new to Acrobat. We need to create a form template that contains dynamic table control so that it can be populated using auto field detection.
    Our dynamic table contains reimbusement information, the rows vary from one claim to another.
    Please help. We are having Acrobat 9 Pro.
    Thanks
    Prasadh

    A lot is possible. There is a scripting language which should fill the gaps of missing features. There is data merge, there is XML, there is InCopy. Read everything about it and you will surely find what you need.

  • Making dynamic table header

    Hi,
    I want to know how to put some value on a table header dynamically.
    Regards
    Hawker

    When the footer goes to the 2nd page the page subform is incremented so you will have to reference the page subform as well. I suggest that you add a button (this is for a test only) to the footer subform and add the code app.alert(this.somExpression). Now render the form and make sure the footer stays on one page. Hit the button and take note of the someExpression. Now add enough rows to force the footer to a new page. Hit th ebutton again and take note of the changed somExpression. So to solve your problem you will have to find out which page your footer is on. and then construct your expression to incorporate this chane in expression. Note that the indexes are 0 based but the page numbering is 1 based.
    Hope that helps
    Paul

  • Creating a dynamic table that spans multiple pages

    Hi guys,
    I have a script that is able to add rows to a dynamic table.
    The issue I am having now is I want this dynamic table to span multiple pages.
    I'm not exactly sure how to do this. It looks like to me that the table stops once it reaches the height of the text frame enclosing it.
    How do you create a table / text frame that expands to it's contents and not the size of the text frame enclosing it. Ideally I want this table to span multiple pages.

    OK, I have 3 screenshot to see if that will help.  My book is a transcription of some old county records around 1800. I have a section of my book that had a list of items in text separated by a right tab.
    I highlighted that text and converted it to a table.  In portrait mode I can scroll and see all the table.
    When I switch to landscape mode the table is cut off and does not wrap to the next page.
    The text after the table appears on the next page.  The preview on the ipad is the same. 
    Thanks for any help on figuring this out. Also, I enjoy your podcasts.
    MB

  • Dynamic Table Header in WebI

    Hi community
    I'm currently facing quite a challange with WebI:
    I have (simplified) the following data structure in my Universe (which ist built upon a BEx Query):
    - Customer
    - Calendar Day
    - Calendar Week
    - Calendar Month
    - Turnover
    Now, the customer want's to a have cross-tab like this one:
    June 2010
    July 2010
    August 2010
    Customer 1
    324'324
    847'342
    543'534
    Customer 2
    567'456
    249'143
    579'134
    The challange is: The customer wants to select the data by a list of customers (that's easy) and one of the three time dimensions (would be easy too). BUT: Depending on the time dimension the user selects, the cross-tab's table header should change to that dimension! So, when the user enters "july 2010 - august 2010" the table's header shows the months like in my example above. When he leaves the month blank in the prompt and restricts calendar week to "03.2010 - 07.2010", the table's header should show the corresponding weeks, not months!
    Has anyone an idea how to accomplish this?
    Restriction: I don't want the user to have to "drag & drop" the dimensions from and into the table. The report should not be editable.
    Thank you trying to help me!
    phil

    Capture the User selection using UserResponse() function.
    Eg: Prompt on Month: Select Month == Jan2010 (User Selected)
    In Table headers: write formula like this:
    |=UserResponse(Select Month) | =UserResponse(Select Month)-1 | =UserResponse(Select Month)-2 etc...,
    Seems you have Prompts for both Month and Week as well, follow the same.
    Hope it helps you.
    Thank You!
    H2H

  • How to create a dynamic table?

    Hello experts!
    I would be very grateful for assistance with a complicated requirement I have gotten.
    I am working within a user exit in BI-IP and one of the parameter in the method is a table (whose structure is dynamic):
    C_TH_DATA     Changing     Type     HASHED TABLE     Transaction Data
    Due to the requirements I have I need to create a table based on the C_TH_DATA table BUT with a few additional fields.
    I have posted my first attempt below (it is syntactically correct).
    Does my approach make sense???
    Grateful for any suggestions.
    Greetings,
    Martin
    method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE.
      field-symbols:
        <f_ref_data>        type  any,
        <f_interim_data>    type  any,
        <f_new_data>        type  any,
        <f_itab>            type  any table,
        <f_infoprov>        type  RSINFOPROV,
        <f_infoprov_ref>    type  RSINFOPROV,
        <f_ref_data_BCCMP07>  type  any,
        <f_ref_data_BCCMC02>  type  any,
        <f_spc>             type  /bic/oiBHSPC0,
        <f_spc_ref>         type  /bic/oiBHSPC0,
        <f_blcopem1>        type  /bic/oiblcopem1,
        <f_blcopem1_ref>    type  /bic/oiblcopem1,
        <f_blcalpo0>        type  /bic/oiblcalpo0,
        <f_blcalpo0_ref>    type  /bic/oiblcalpo0.
      data:
        l_r_data1            type  ref to data,
        l_r_data2            type  ref to data,
        l_d_sumcostpo        type  f,
        l_d_deltacostpo      type  f,
        l_d_sumdeltacostpo   type  f.
    Generate new (empty record)
      create data l_r_data1 like line of c_th_data.
      assign l_r_data1->* to <f_new_data>.
      TYPES:
        BEGIN OF l_modif_c_th_data,
          l_r_itab    type  ref to data,
          thiscostpo  type  /bic/oiblcopem1,
          thiscostto  type  /bic/oiblcopem2,
          thiscostcm  type  /bic/oiblcopem3,
          thismanpo   type  /bic/oiblmansec1,
          thismanto   type  /bic/oiblmansec2,
          thismancm   type  /bic/oiblmansec3,
        END OF l_modif_c_th_data.
      data:
        l_r_itab    type  ref to data.
      create data l_r_itab type table of l_modif_c_th_data.
      assign l_r_itab->* to <f_itab>.
    Generate new (empty record)
      create data l_r_data2 type l_modif_c_th_data.
      assign l_r_data2->* to <f_interim_data>.

    Hi marcin,
    thanks for your answer.
    Im trying your examples ( /people/marcin.pciak/blog/2010/09/09/do-you-really-know-everything-about-typing--part-2 ) but your example dumps.
    DATA gr_elemdescr_p   TYPE REF TO cl_abap_elemdescr.
    DATA gr_elemdescr_i   TYPE REF TO cl_abap_elemdescr.
    DATA: gt_components   TYPE cl_abap_structdescr=>component_table,
            wa_component    LIKE LINE OF gt_components.
      DATA: gr_structdescr  TYPE REF TO cl_abap_structdescr.
      wa_component-name = 'HEADCOUNT'.
      wa_component-type = gr_elemdescr_i.
      APPEND wa_component TO gt_components.
      wa_component-name = 'CAPACITY'.
      wa_component-type = gr_elemdescr_p.
      APPEND wa_component TO gt_components.
      gr_structdescr = cl_abap_structdescr=>create( gt_components ).  <= causes error CX_SY_STRUCT_COMP_TYPE
    DATA gr_data TYPE REF TO data.
      CREATE DATA gr_data TYPE HANDLE gr_structdescr.
    I suspect Im doin something wrong.

Maybe you are looking for

  • SAP CRM integration with SAP R/3 using Xi

    Hi All, I am planning to us SAP XI to integrate PEOPLESOFT SYTEM TO SAP CRM . This is the Scenario                  File adaptor     xif adaptor Peoplesoft----->     XI      --->    sap crm. 1)Is this the best practice to integrate PEOPLESOFT  SYTEM 

  • White screen and computer and iTunes will not recognize

    I was attempting to install the update, when my computer and iTunes stopped recognizing the iPhone. Now it is stuck on a white screen, and I can't do anything. Help, please!

  • Function-Based Index enabling.

    Hi... I'm trying to create a function-based index along the lines of: CREATE INDEX x_ssn4 ON table_y(SUBSTR(ssn,6,4)) UNRECOVERABLE; ...so as to be able to query the final 4 digits of social security numbers. Problem is that the above elicits an ORA-

  • Color profile changed in LR 5 installation?

    Hi, I installed LR5 from LR4 yesterday and each time I open an image in CS5 from my LR5, I get the following message: The document "IMG_9082.CR2"has an embedded color profile that does not match the current RGB working space. Embedded:  Adobe RGB (19

  • Registry editing disabled by your administrator

    Win7 Enterprise edition.   64Bit.   In a workgroup setting. Logged in as local ADMIN. GPO SETTING  -  USER CONFIGURATION/Administrative Templates/System - Prevent Access to Registry Editing Tools Prevent Access to the Registry is ENABLED Disable rege