Add sort images in DataGrid Header

Hi,
I have a datagrid, where in I have defined the 'headerRelease' event to sort the data-grid columns. The sorting that I have to use is not the default sorting. It has some other rules, which have been defined in the headerRelease event.
<mx:DataGrid id="idGridWebAlerts" dataProvider="{ webAlertsPage }"  variableRowHeight="true"
        width="100%" headerRelease="headRelEvt(event)" selectable="false" />
In the headerRelease method, I have called the preventDefault() method of the header Release event, which will disable the default sorting. Due to this method call, the sort order images, that appear by default on datagrid column header do not show up.
One of the ways to add those images is to use HeaderRenderers, but that causes flickering of headers after the datagrid has loaded. Is there any other way we can get/add the sort order depiction images to data grid header?
Please help.
Anjali

Hi,
I tried the table sorter utility.but it is sorting only if there are text property.
so it is sorting according to the text.
then i tried the code
Comparator comparator = new Comparator()
       public int compare(Object x1, Object x2)
          IResultNodeElement e1 = (IResultNodeElement ) x1;
          IResultNodeElement e2 = (IResultNodeElement ) x2;
          return e1.getDs().compareTo(e2.getDs());
     wdContext.nodeResultNode().sortElements(comparator);
Then it is sorting in one order..is there any way to sort it in other order..
Regards
AD

Similar Messages

  • How to add an image in the header? Pages 5.0

    I don't believe I have to use Microsoft Word! I can't, no way, add an image in the header. This is unbelievable!
    **** time I updated to Mavericks!
    Please, does anyone know the solution?
    I'm losing a great deal in my company.

    Do you still have Pages 4.3 installed. If so, use that.

  • Error message when I try to add an image to the header

    I receive the following error message when I try to add an image to the header:
    Acrobat.com encountered an unexpected error.
    I have tried to add .jpg and .gif without success.
    Thanks,
    MDawn

    Hi,
    We typically see this when an organizations IT department is blocking the upload of images.  Are you working on this at work?  If so, can you try adding the image outside your companies network?
    Thanks,
    Todd

  • How can i add an image into the header

    When printing a webpage i would like to ad an image into the header? Is this possible?

    Thanks. The triangle was buried in the image. If you hadn’t told me where to look, I would never have found it!
    Michelle
    Michelle Lancto
    Jewish Endowment Foundation
    a division of the Jewish Federation of Western Massachusetts
    Phone: 413-732-9994                Fax: 413-737-4348
    <mailto:[email protected]> [email protected]
    <http://www.jefwesternmass.org/> www.jefwesternmass.org 
    <http://www.jewishwesternmass.org/> www.jewishwesternmass.org
    JEF_Logos_1101_JFWM for email LOW RES
    Confidentiality Notice
    The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.

  • Add background image to widget-heading

    How do I add a back ground image to <div class="widget widget-heading-simple widget-body-gray">? When I add it it seems to only show up in Dreamweaver but when I preview it in my browser it wont show.

    Right now it is being defined in your css file called...
    style-default-menus-light.css
    at about line 2513
    If you like, the easiest way to make sure it never gets taken over by an external stylesheet would be to add a style attribute inline to the tag itself...
    <div class="widget widget-heading-simple widget-body-gray" style="background-image:url(yourimage.jpg);">

  • Add image to table header

    Hello dear All
    My requirement is to add an image in jTable header( *.png or *.gif image in the tabel header.) I.e if there are 5 columns i have to add 5 images in the table header.
    Please help me to overcome this issue.
    Thanks

    Sorry, it looks like the tutorial has recently been updated. Sorting is now supported in JDK6. Prior to this you needed to write your own code for sorting and the tutorial include sample classes to help you out.
    Anyway, I found some old code lying around that should get you started:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableHeader extends JFrame
         public TableHeader()
              Object[] columnNames =
                   "Some Text",
                   new ImageIcon("copy16.gif"),
                   new ImageIcon("add16.gif")
              //  Columns headings are cast to a String when created automatically.
              //  We want Icons, so use a special renderer and create the columns manually
              DefaultTableModel model = new DefaultTableModel(columnNames, 5);
              JTable table = new JTable();
              table.setAutoCreateColumnsFromModel( false );
              table.setModel( model );
              table.getTableHeader().setDefaultRenderer( new HeaderRenderer() );
              for (int i = 0; i < columnNames.length; i++)
                   TableColumn newColumn = new TableColumn(i);
                   newColumn.setHeaderValue( columnNames[i] );
                   table.addColumn(newColumn);
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         class HeaderRenderer extends DefaultTableCellRenderer
              public Component getTableCellRendererComponent(
                   JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col)
                   setBorder(UIManager.getBorder("TableHeader.cellBorder"));
                   setHorizontalAlignment(CENTER);
                   //  display text or icon
                   System.out.println(value.getClass());
                   if (value instanceof Icon)
                        setIcon( (Icon)value );
                        setText( "" );
                        setBackground( Color.green );
                   else
                        setIcon( null );
                        setText((value == null) ? "" : value.toString());
                        setBackground( Color.yellow );
                   return this;
         public static void main(String[] args)
              TableHeader frame = new TableHeader();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • Add categories to DataGrid header

    Is there a simple way to add categories to the DataGrid header? Basically, instead of just a single row with headers, I want an additional row that sits above that row and describes sections of the grid (rather than individual columns). E.g., in html, I could do something like this:
      <table>
        <tr><th colspan="2">Name</th><th colspan="2">Data</th></tr>
        <tr><th>first</th><th>last</th><th>age</th><th>gender</th></tr>
        <tr><td>john</td><td>doe</td><td>26</td><td>male</td></tr>
      </table>
    Is there a reasonable way to do something like that in Flex? I've looked at Alex Harui's DataGrid footer, but after playing around with it a bit, it doesn't seem that it would be easily adapated.

    So I'm trying to generalize this to more than two subcolumns. I got the item renderer working fine, but when I include the modified SplitDataGridHeader as a custom header renderer, it fubars the whole grid (even the other columns). I assume something I'm doing is making the Player very unhappy, but I don't see any errors when debugging in FlexBuilder: the entire Grid just shows up as plain white, with no styles applied and no data at all (even for the columns using standard renderers). Any idea what could be causing issues like this?

  • First Script: Need some basic skill help? Can you add an image with a click?

    Hello, Im working on a project were you can replace people heads in a photo. Its for a project so its not supposed to be perfect. So far heres what i think the best steps to take are, but im not sure how to take the first scripting steps. How can i add an image with a script? How can i store a x y coordinates?
    1. I would create four variables and than store the XY cords of the the high point of the head, the bottom of the chin, amd the farthest right and left of the face.
    2. I would than add the image of the head that I would already have.
    3. If the x coordinates of the top and bottom are off kilter, I would rotate new head until = old face dimensions..
    4. I would also see if the width is too big or small and resize accordingly
    5. I would than resize the head so that the eyes would match up.
    Thanks for any help you can provide!

    Is that script for a browser html. Its not for Photoshop and like Photoshop would fine UiApp undefined so does Microsoft.  Is that a Chrome script or Android script? Why post it here?
    Atiqur Sumon wrote:
    function doGet() {
       var app = UiApp.createApplication();
       // The very first Google Doodle!
       app.add(app.createImage("http://www.google.com/logos/googleburn.jpg"));
       // Just the man in the middle
       app.add(app.createImage("http://www.google.com/logos/googleburn.jpg", 118, 0, 50, 106));
       return app;

  • Image to the Header

    How do I add an image to the header in the new Pages.  Used to be able to in the older versions.

    Just one of over 90 features Apple removed from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • How do i add images in the header and footer to a PDF using iText

    Hi ,
    I want to add images to the header and footer of every page while i am genrating a pdf i have created a separate class called EndPage which i am instanceiating its default constructor in another class 's button action method.
    The above code genrates a PDF for me however it genrates a file with file size zero bytes and does not open it following is my sample code
    //**********Any Help would be appreciated
    Thank You
    public class My_Class
    public String pdf_action()
    EndPage ep=new EndPage();
    return null;
    }//My_class Ends
    class EndPage extends PdfPageEventHelper
    * Demonstrates the use of PageEvents.
    * @param args no arguments needed
    public EndPage()
    try {
    com.lowagie.text.Document document = new Document(PageSize.A4, 50, 50, 70, 70);
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("D://proposals/endpage.pdf"));
    writer.setPageEvent(new EndPage());
    document.open();
    String text = "Lots of text. ";
    for (int k = 0; k < 10; ++k)
    text += text;
    document.add(new Paragraph(text));
    document.close();
    catch (Exception de) {
    de.printStackTrace();
    public void onEndPage(PdfWriter writer, Document document) {
    try {
    Rectangle page = document.getPageSize();
    PdfPTable head = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    head.addCell("head " + k);
    head.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    head.writeSelectedRows(0, -1, document.leftMargin(), page.height() - document.topMargin() + head.getTotalHeight(),
    writer.getDirectContent());
    PdfPTable foot = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    foot.addCell("foot " + k);
    foot.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
    writer.getDirectContent());
    catch (Exception e) {
    throw new ExceptionConverter(e);
    }

    Hi,
    Thanks for the quick response.
    The problem is that when I keep the logo as a watermark, the pdf is not adjusting itself to include the logo as header.
    But if I add a header text via Tools -> Headers and Footers, the pdf is adjusting itself so that the header text is at the beginning , not overlapping with the contents of pdf.
    But while using logo as watermark, some times overlapping of the pdf contents and logo is happening.
    Is there any way to add a logo in the Header and Footer via the option in Tools -> Headers and Footers
    Thanks,
    Vidhya

  • How to add an image or static text in the header of EACH page of a cross-Tab report

    Post Author: rtutus
    CA Forum: General
    Hi, I use Crustal 11.0.
    I have a cross Tab. I display the items on the left column and the months horizontally, the items are grouped by category field. The values are the sum of quantities are displayed for each month. Like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    The problem, I want to add a page header for each page of the report.
    When Crystal reports first displays my cross-tab in the designer, CR displays the cross tab in the Report header section. I d like to add text or image for each page and not only at the begining of my Cross-Tab.
    If I just add an image or text at the top of the report designer, which is my report header, I get the image or text only on the begining of the 1st page of my report but never in the other following pages.
    If I try to work around the problem and move the cross Tab to a group section instead, and then put the Image in the group header, I get what I want, but the problem is that:
    The columns header: Jan, February....December are displayed for each group of my report and not only in the beginning of the report. I get something like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    You see the months get duplicated. Any way, my real need is to add an image or text in the header of EACH page of a cross-Tab report.
    Thanks a lot for your help.

    Hi Divya,
    you could do for example in the wdDoInit() of the view
    wdContext.currentContextElement().setPicture("picture.gif");
    Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
    I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials.  I have learned tremendously from them.
    Hope this helped
    Harald

  • How to add an image in a hub section header

    Hi.
    I want to add an Image in a hub section header. Is it possible to add an image with the section header so that like the section header when I click on the image it would also navigate me to that section page ?
    samEE

    Something like this might work for you:
    <HubSection IsHeaderInteractive="True"
    DataContext="{Binding Section3Items}"
    d:DataContext="{Binding Groups[3],
    Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"
    Padding="40,40,40,32">
    <HubSection.Header>
    <Image Source="Assets/Logo.png"></Image>
    </HubSection.Header>
    http://peted.azurewebsites.net/

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • Anchor link only for image in table header for sorting

    Hi,
    I need to implement sorting functionality for datatable.
    for sorting header of the table column will have image along with header text.
    for this i am using <h:commandLink> and <h:graphicImage>.
    But i am getting behaviour as anchor link for both text and image.
    deserved behavior for this is only ofr Image.
    If any one implemented the same ..please help me
    Regards

    Try:
    Sub ClearKeepWNext()
    Dim Tbl As Table, i As Long
    For Each Tbl In ActiveDocument.Tables
      With Tbl
        .Range.ParagraphFormat.KeepWithNext = False
        For i = 1 To .Rows.Count
          With .Rows(i)
            If .HeadingFormat = True Then
              .Range.ParagraphFormat.KeepWithNext = True
            Else
              Exit For
            End If
          End With
        Next
      End With
    Next
    End Sub
    If the tables only have a single heading row, you could instead use:
    Sub ClearKeepWNext()
    Dim Tbl As Table
    For Each Tbl In ActiveDocument.Tables
      With Tbl
        .Range.ParagraphFormat.KeepWithNext = False
        With .Rows(1)
          If .HeadingFormat = True Then
            .AllowBreakAcrossPages = False
          End If
        End With
      End With
    Next
    End Sub
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Add image in Group Header

    Hi All
    Cud anyone tell me how to add/upload image in Header of element "Group"??
    Regards.
    Nikhil.

    Hi Nikhil,
        First Put the Required Image in the following Path
    1.)If it is Web Dynpro Project
    Go to Work Space --> <Project Name>\src\mimes\Components\<Package Name>\<Your Required Image>
    2.)If it is Development Component
    C:\Documents and Settings\<User Name>\.dtc\LocalDevelopment\DCs\<Vendor>\<DC Name>\_comp\src\mimes\Components\<Package Name>\<Your Required Image>
    after that in the Group header properties go to the imageSource = <Image Name>.<Extension Name>
    Ex:- imageSource = Flower.jpg (Image Name is Case Sensitive)
    Note:- Web Dynpro Supports Jpg/Jpeg & gif Images.
    With Regards,
    Roop Kumar.
    Edited by: Roop kumar Annavarapu on Sep 1, 2008 8:30 AM

Maybe you are looking for

  • Iphone airprint does not work on my new HP8500 Premier (a910n). please help.

    I just got the HP 8500A premier printer (a910n) and it's set up for wireless printing from my 2 laptops at home.  I just tried printing from my iphone 4 but it is unable to locate the printer.  Does anyone know how I can fix that?  The product page c

  • Reciever File Adapter to create multiple target files

    Hi All, I have done the mapping to create multiple output messages . I would like each of the messages to be stored as a separate file in the target . Below is the output message with 2 separate MT_CANCELOUT  messages . However, both end up in one si

  • Problem on Creating a Swapfile for adding swap space

    Folks, Hello. I am using Oracle Linux 5.6. At this time, the Linux swap space is 0 KB by using the command: [root@rac1 /]# grep SwapTotal /proc/meminfo I need 150MB swap space to install Oracle Database. I create the swap space using the following co

  • Query on Withholding Tax

    Hi Expert, I'm using the following query to inquire on withholding tax. SELECT T0.[DocDate], T0.[TransId], T0.[CardName], T0.[LicTradNum] as 'TIN', T0.[WTApplied], T0.[WTSum], T0.[WTSum]-T0.[WTApplied] as 'Tax Due' FROM OPCH  T0 WHERE T0.[DocDate] >=

  • Fitting text inside shape (Justification?)

    Hi Guys, I'm trying to find a way to fit a text inside a shape and to align it exactly to the shape borders, I was trying to play with the justification panel under the paragraph link but couldn't make it work, I was trying to fit my text inside a sh