IGrid 11.5 column sort options

A simple question with probably a complex answer.
I have a iGrid based off a Xacute time-based query. The user would like the ability to click on a column header to resort the iGrid. That part is easy using the columnselectionevent and passing the columnName back to the transaction. This method executes the transaction on each header click.
I do not want the transaction to run on each header click though. QueryCaching I don't think is a option as this is a time-based query.
Any ideas out there.?
Regards,
Roger DeWeese

Roger,
We missed you and Tom down in Nashville last week.
You are correct - QueryCaching is ignored in a Time Based query since it would lead to excessive cache objects, which would probably never be matched again by a subsequent user request.
Column sorting with Ctrl+Click on the Column Heading has been added to the iGrid in upcoming version 12.1, but of course that doesn't help you today.
Without running the Transaction again you could however leverage the /Illuminator/StyleSheets/GenericSortFilter.xsl transform and enable QueryCaching.  If you map your Transaction date properties in the Param.x location and it will not know that it is time based, but you of course will lose the SD/ED buttons and VCR control buttons in the toolbar and potentially take charge of the date logic in the BLS too. 
Then from the ColumnSelectionEvent if you set one of the XParamValue.x settings it will use the cached query results and just reapply the sorting xsl.  (Look at the params at the top of the xsl file to see the parameter name settings needed to map into your Xacute Query template below the Transform)
Regards,
Jeremy

Similar Messages

  • Problem with column sort option

    I have a two page form application. Page 1 shows a list of entered estimates for a sales consultant. Page 2 is the detailed estimation page. When I delete the record on the detail-page and branch back to page 1 I get the follwoing error. "failed to parse SQL query: ORA-06502: PL/SQL: numeric or value error: NULL index table key value". This happens only when I remove the last estimation record AND I have at least one column flagged as "sort". If I take the sort option of the column(s) it is working fine. If I exit the page and come back-in again everything is fine as well. I have specified to clear the cache when I branch from page 2 to page 1. I hope this is enough detail.

    I think I get really good at answering my own questions.
    It seems when you select the sort option on a column you must also set the "Sort Sequence".

  • Alv sort option

    Hi Folks .
    can anyone tell me how can i disable the column sort option ?
    i mean that when i point with the cursur on the column header appears a little downside arrow that can sort the column asc or dsc .

    You can disable standard functions by:
    wa_toolbar_excld1 = cl_gui_alv_grid=>MC_FC_SORT.
    APPEND wa_toolbar_excld1 TO t_toolbar_excld1.
    wa_toolbar_excld1 = cl_gui_alv_grid=>MC_FC_SORT_ASC.
    APPEND wa_toolbar_excld1 TO t_toolbar_excld1.
    wa_toolbar_excld1 = cl_gui_alv_grid=>MC_FC_SORT_DSC.
    APPEND wa_toolbar_excld1 TO t_toolbar_excld1.
    where
    Data:
    t_toolbar_excld1   type ui_functions, "buttons to exclude
    wa_toolbar_excld&1 like line of t_toolbar_excld1.
    Then pass the toolbar exclude table in the ALV call:
    CALL METHOD r_alv_grid1->set_table_for_first_display
         EXPORTING is_variant           = w_is_variant1
                   is_layout            = w_is_layout1
                   i_save               = c_alv_save_cd
                   it_toolbar_excluding = <b>t_toolbar_excld1</b>
         CHANGING  it_outtab            = my_table          
                   it_fieldcatalog      = t_fieldcat1.
    This will disable sorting on all columns.
    If you only want to disable sorting for specific columns, then a different technique is needed.
    There is an event called BEFORE_USER_COMMAND that executes some of your code before doing the standard ALV code.  Your code could detect the sort request, determine the column being requested, and then override the UCOMM field using method set_user_command if you did not want the sort to continue.
    Lot of details missing here and I do not know how a sort request on multiple columns would be handled so some testing would be required.
    Serdar Simseklaer's "An Easy Reference for ALV GRID CONTROL" should also be helpful.  Available at http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an easy reference for alv grid control.pdf
    Could anyone tell me how to post links in these messages in a cleaner way?  Also, how to post code so the indentation does not get lost?

  • How to remove Sorting options from Report's Column Headers.

    Hi All,
    When i try to run a Query in Enterprise Portal, I'm getting a " Sorting option" in each column. Thats not needed in a Report.
    Kindly suggest me How to remove that Sorting options from Each colum header.
    Thanks in Advance.
    Regards,
    Jayaprakash Jayachandran.

    hi,
    U can uncheck the sorting option in Navigation Pane,which will remove all sorting options.
    Regards,
    aanand

  • Print or download ALV report with sort options

    Dear friends,
    How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
    Regards,
    Praveen Lobo

    Hi Praveen,
    Use this code, its working:-
    *FOR SORTING DATA
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT W.R.T. CUSTOMER NAME
      wa_sort-spos = 1.
      wa_sort-fieldname = 'NAME1'. "field customer name
      wa_sort-tabname = 'IT_KNA1'. "internal table with records
      wa_sort-up = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    "this will sort the ALV o/p for customer with same name
    "now the name will not be repeated
    "records with same name will be grouped
    *          DISPLAY RECORDS IN ALV GRID
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = sy-repid "report id
        it_fieldcat                       = it_field "field catalog
        it_sort                           = it_sort "sort info
      TABLES
        t_outtab                          = it_kna1 "internal table
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM

  • Issue Action links,Column sorting in OBIEE(11g) 11.1.1.7.0

    Hello everyone,
    I want to provide the feature column sorting to my users but i dont want to provide any feature to users when they click on right mouse button.When we click on right mouse in action link column value it is giving the "action links","include/exclude columns" options etc.
    I disabled the do not display the action link report name in the column properties.
    Also disable the  include/exclude columns options in the interaction XYZ properties of the view.
    But still i am not able to understand why these links are coming when i run the report from the dashboard.
    Please help me out here.
    thanks,
    prassu

    Hi Timo,
    I am using data control web services to get these attributes on to the jspx page. The table has the value property which is binding to the iterator( #{bindings.SUMMARY_LINES_ITEM.collectionModel}).
    The table has various coulmns like order no, status, request and so on..where Order no and status are converted to a cmd link which navigates to another page on a query.
    I don't understand how setting sorting to true in one of the columns can make it not found in the iterator! And I get the errors only if sorting is done first before querying(clicking on one of the values in a column to navigate to another page).
    Thanks,
    Sue

  • How can I save my finder arrange/sort options once and for all?

    I'm opening the Finder View Options panel and resetting the arrange and sort options several times a day and it's driving me nuts. The Finder ignores my desperate pleas to apply these options system-wide and seems to purposely forget the options I chose the day before.
    I notice that the Icon view, List view, and even the Cover Flow view in the Finder get a "Use as Defaults" button in the View Options. Those of us in the Column View don't get that button, though. What have we done to deserve this?
    I'd like the Finder to now and forevermore open every window with the following options:
    Column View
    Arrange By > Kind
    Sort By > Name
    Can anyone help me make this happen? Thanks!

    I've found setting the Arrange By to anything other then None gives different results then what I expected.
    Select Column View from the Tool bar then open View Options and set Arrange By to None and Sort By to Name.
    If you then see the names in reverse alphabetical order click on list in the tool bar then on the Name column header to put them right. in Alphabetical order, then switch back to column view on the Tool bar. you should be good to go from there
    Whoever thought up Finders View logic should have their head checked.

  • Help on Oracle Report sort option!

    Hi,
    My query in Q_1 of Oracle report is select &a_code ori_code ,&a_desc ori_description from &a ori_lup order by &b. When click on OK button it says
    ORA-00936: missing expression
    select ori_code,ori_description from ori_lup order by ==>
    I am not able to resolve this problem.
    What I am trying to do is I have some maintenance tables which have almost same columns like code, description. I want to define a single report and pass on parameters to this report, so that I can use same report for different tables. If I dont give order by clause it is working fine, but I should also provide sort option based on user selection of sort by code/description.
    Thanks for your help.
    Param Dasana
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andrew Tselischev ([email protected]):
    Hi
    If I correcly understand you need sorted query, if the parameter 'b' is given, and not sorted query otherwise.
    This may be done, for exeample, by the following way.
    1. Delete the text 'order by' in your query as follows:
    select &a_code ori_code ,&a_desc ori_description from &a ori_lup &b
    2. Create 'AFTER PARAMETER FORM' trigger:
    function AfterPForm return boolean is
    begin
    IF LENGTH( LTRIM( RTRIM( :b ) ) ) > 0 THEN
    :b := 'ORDER BY ' | | :b;
    ELSE
    :b := '';
    END IF;
    return (TRUE);
    end;
    I think it will help for you.
    Andrew<HR></BLOCKQUOTE>
    Thanks Andrew , it worked with your suggestion!!!
    Param.
    null

  • Sort options right justified in list view

    New to Maverick's, but I can't get my finder window to "stick" with the layout of the "sort options". My biggest beef is that I have the "Name" sort far left followed by "Date modified", etc.. yet every day in every new finder window, the 2nd sort jumps to right justified. I want this sort option to stick to the left alongside name. I use large monitors and scrolling over everytime to drag the sort modifier to the left is frustrating. Is there a solution?

    My guess would be the Images folder (Pictures in English) is designed to have the special, contextual grouping types.
    I don't know why they couldn't make them available in the dropdown menu, also, but they're not.
    I did a little testing and found if I called it Pictures unsorted, the options were available, but if I called the folder unsorted Pictures, they weren't.
    Try naming the folder starting with Images
    Edit: If I select the dimension and resolution column headers in the folder, then change the name of the folder, the columns are retained.

  • POWL Query Column Sorting Disabled

    Hello,
    We are implementing MSS on Portal and using POWL for Time Approvals. For one query in POWL, the Sorting Option is disabled for all the Columns ,also when I goto the Settings Dialog -> Sort Tab , there are no Columns available under Unsorted Columns for this query,for all other queries it's there.
    Where do we Configure for which Query Sorting is Enabled or Disabled for it's Columns.
    Any help would be highly Appreciated.

    Hi Rohit,
    The filter appears after clicking the header of a particular column.
    The filtering behavior depend on the UI guidelines used.
    If you want to switch to old behavior you can switch to 1.1 version.
    Run WD application "WD_GLOBAL_SETTING".
    Go to Change mode and scroll down to section "Design" and select the "UI
    Guideline 1.1".
    Finally save the settings.
    Thanks
    KH

  • Customizing column sorting in new jsf table

    The new JSF table in the creator 2 is great. I like it. It includes so many out of the box features. It is the reason we use the creator for our current project.
    But I cannot figure out how to customize the column sorting.
    Why do I need column sorting?
    I need to sort a column that can include ad IP address or a host name. Our customer can either use a host name or an IP address to address a device in the network, both in the same column.
    Now sorting an IP address is already difficult. It is actually a sort over a 4 byte number. Sorting over host names is normal alphabetic string sorting.
    How to sort over both in the same column?
    This cannot be done using standard sorting. I need to use a validator or something similar to customize the sorting of this column.
    Can anybody help me with a hint if:
    1- Customizing sorting over a column is possible. (I really would like to keep all other sorting features (icons, multi column support...)).
    2- A hint or code sample, how to do this.
    If this is not possible, I urge the creator team to think of implementing this soon. Otherwise one killer feature of the creator 2 will lose a lot of its teeth.

    Thx mayagiri for your reply!
    But including the src-code for the dataprovider package into a test project, and debugging in the creator-ide has done the thing!
    Here our solution:
    Class ToCompare is the object type which address field displayed in a page, simply containing a table with 2 adress colums, that can be sorted either according to our ip/hostname-comparison or according to String.compare().
    * ToCompare.java
    * Created on 10. Februar 2006, 10:41
    * This class is a basic model object,
    * with a field - String address - according
    * to which it shall be sortable.
    package comparator;
    * @author mock
    public class ToCompare {
         * holds the IP or Host address
        private String address=null;
         * Instance of a Comparator class that
         * provides our sorting algorithm
        private RcHostComparator hostComparator=null;
        /** Creates a new instance of ToCompare */   
        public ToCompare() {
            this("defaultHost");       
         * when creating a new ToCompare instance,
         * the hostComparator is created for it
         *  @ param aAddress - IP or Hostname
        public ToCompare(String aAddress) {
            address=aAddress;
            hostComparator=new RcHostComparator(address);
        public String getAddress() {
            return address;
        public RcHostComparator getHostComparator() {
            return hostComparator;
    }Here the code of the Class RcHostComparator, it is created with the address field of the ToCompare object that it holds. It first checks if the address field is an IP or not, and then chooses the comparison algorithm according to its own field state and the field state of the object to compare to:
    * RcHostComparator.java
    * Created on 10. Februar 2006, 10:43
    *  This class is used to provide a method for
    *  comparing objects that have an address field,
    *  containing either IP adresses or hostnames.
    package comparator;
    import java.text.CollationKey;
    import java.text.Collator;
    import java.util.Comparator;
    import java.util.Locale;
    * @author mock
    public class RcHostComparator implements Comparator
         * holds the IP or Host address
        private String address=null;
         * Is the address an IP
        private boolean isIPAddress=false;
         * if (!isIPAddress) this is created out of the address
         * to provide a performant way of comparing it with another
         * CollationKey, in order to sort Strings localized
         *  @ see java.text.Collator
         *  @ see java.text.CollationKey
        private CollationKey hostnameCollationKey=null;
         * if (isIPAddress) this array holds
         * the 4 byte of the Ip address to compare
        private int[] intValues=null;
         * minimum for IP bytes/ints
        private static final int minIntValue=0;
         * maximum for IP bytes/ints
        private static final int maxIntValue=255;
         * Creates a new instance of IpComparator
         *  @ param aAddress  - holds the IP or Host address
        public RcHostComparator(String aAddress) {
            address=aAddress;
             * check if address is an IP
            isIPAddress=checkIP();
             * if Hostname -> instantiate localized CollationKeys
            if(!isIPAddress){
                 Collator _localeCollator=Collator.getInstance(Locale.getDefault());
                 hostnameCollationKey=_localeCollator.getCollationKey(address);
            }else{}
         *  Here the comparison of the address fields is done.
         *  There a 4 cases:
         *  -1 both Hostnames
         *  -2 aObject1 IP, aObject2 Hostname
         *  -3 aObject1 Hostname, aObject2 IP
         *  -4 both IPs
         *  @ param aObject1, aObject2 - Comparator objects
        public int compare(Object aObject1, Object aObject2)
          int _result= 0;
          if(aObject1 instanceof RcHostComparator && aObject2 instanceof RcHostComparator )
               RcHostComparator _ipComparator1=(RcHostComparator)aObject1;
               RcHostComparator _ipComparator2=(RcHostComparator)aObject2;
               *  Compare algorithms, according to address types
               if(!_ipComparator1.isIPAddress()&&!_ipComparator2.isIPAddress()){
                       *  If both addresses are Strings use collationKey.compareTo(Object o)
                    _result=_ipComparator1.getHostnameCollationKey().compareTo(_ipComparator2.getHostnameCollationKey());
               }else{
                       *  IPs are smaller than Strings -> aObject1 < aObject2
                    if(_ipComparator1.isIPAddress()&&!_ipComparator2.isIPAddress()){
                         _result=-1;
                    }else{
                                *  IPs are smaller than Strings -> aObject1 > aObject2
                         if(!_ipComparator1.isIPAddress()){
                              _result=1;
                         }else{
                             int _intIndex=0;
                             int[] _int1=_ipComparator1.getIntValues();
                             int[] _int2=_ipComparator2.getIntValues();
                                      * compare IP adresses per bytes
                             while(_result==0 && _intIndex<4){
                                  if(_int1[_intIndex]>_int2[_intIndex]){
                                       _result=1;
                                  }else if(_int1[_intIndex]<_int2[_intIndex]){
                                       _result=-1;
                                  }else{}                            
                                             _intIndex++;
          }else{}   
          return _result;
         *  checks if the address field holds an IP or a hostname
         *  if (_isIP) fill intValues[] with IP bytes
         *  if (!isIP)  create hostnameCollationKey
        private boolean checkIP(){
           boolean _isIP=false;
           String[] _getInts=null;
            *  basic check for IP address pattern
            *  4 digits also allowed, cause leading
            *  0 stands for octet number ->
            *  0172=122                  ->
            *  0172.0172.0172.0172 = 122.122.122.122
           boolean _firstcheck=address.matches("[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}");
           if(_firstcheck){
                _getInts=address.split("\\.");           
                intValues=new int[4];
                for (int _count=0; _count<4; _count++){
                   try{                     
                       int _toIntValue;
                       if(_getInts[_count].startsWith("0")){
                                // if leading 0 parse as octet -> radix=8
                               _toIntValue=Integer.parseInt(_getInts[_count], 8);                          
                       }else{  
                                // parse as is -> radix=10 -> (optional)
                               _toIntValue=Integer.parseInt(_getInts[_count]);                          
                       if(_toIntValue<minIntValue||_toIntValue>maxIntValue){
                              // out of unsigned byte range -> no IP
                              return _isIP;
                       }else{
                              // inside byte range -> could be part of an IP
                              intValues[_count]=_toIntValue;
                   }catch(NumberFormatException e){
                           // not parseable -> no IP
                           return _isIP;
               // all 4 bytes/ints are parseable and in unsigned byte range -> this is an IP
                _isIP=true;
           }else{}      
           return _isIP;
        public boolean isIPAddress() {
                return isIPAddress;
        public int[] getIntValues() {
                return intValues;
        public CollationKey getHostnameCollationKey() {
                return hostnameCollationKey;
        public String getAddress()
            return address;
    }The page bean holds an array of ToCompare objects. It is the model for a new table component, hold by an ObjectArrayDataProvider. Here a code excerpt:
    public class Page1 extends AbstractPageBean
        private ToCompare[] toCompare= new ToCompare[]{
            new ToCompare("1.1.1.1"),
            new ToCompare("2.1.1.1"),
            new ToCompare("9.1.1.1"),
            new ToCompare("11.1.1.1"),
            new ToCompare("0172.0172.0172.0172"),
            new ToCompare("123.1.1.1"),
            new ToCompare("a"),
            new ToCompare("o"),
            new ToCompare("u"),
            new ToCompare("z"),
            new ToCompare("�"),      
            new ToCompare("�"),
            new ToCompare("�")        
         * This method is automatically generated, so any user-specified code inserted
         * here is subject to being replaced
        private void _init() throws Exception
            objectArrayDataProvider1.setArray(toCompare);
        private TableRowGroup tableRowGroup1 = new TableRowGroup();   
        private ObjectArrayDataProvider objectArrayDataProvider1 = new ObjectArrayDataProvider();
    }The relevant .jsp section for the two column table looks like:
    <ui:tableRowGroup binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10" sourceData="#{Page1.objectArrayDataProvider1}" sourceVar="currentRow">
      <ui:tableColumn binding="#{Page1.tableColumn1}" headerText="SortIP" id="tableColumn1" sort="#{currentRow.value['hostComparator']}">
        <ui:staticText binding="#{Page1.staticText1}" id="staticText1" text="#{currentRow.value['address']}"/>
      </ui:tableColumn>
      <ui:tableColumn binding="#{Page1.tableColumn2}" headerText="SortString" id="tableColumn2" sort="address">
        <ui:staticText binding="#{Page1.staticText2}" id="staticText2" text="#{currentRow.value['address']}"/>
      </ui:tableColumn>
    </ui:tableRowGroup>Sorting localized with Locale="DE_de" according to ip/hostcompare sorts:
    SortIP
    1.1.1.1
    2.1.1.1
    9.1.1.1
    11.1.1.1
    0172.0172.0172.0172
    123.1.1.1
    a

    o

    u

    zWhereas normal sort over String address whitout localization sorts:
    SortString
    0172.0172.0172.0172
    1.1.1.1
    11.1.1.1
    123.1.1.1
    2.1.1.1
    9.1.1.1
    a
    o
    u
    z


    �Not that short, but I hope it will help - if anyone has the need for another than the default sorting algorithms
    Best regards,
    Hate E. Lee

  • How to give the sorting option in displat table

    Hi Expert,
    How can we give the sorting option in item (material) display table?So that user can filter the data in long table where thousands of data is displaying
    Thanks,
    Kundan

    The sort option should be enabled by default. Click on the right side of each column to sort.

  • Web Dynpro ALV disable column sort for specific column

    Hi,
    I have the above mentioned problem. The Coding I use is:
    DATA:  lr_field_settings  TYPE REF TO if_salv_wd_field_settings,
                lt_fields          TYPE SALV_WD_T_FIELD_REF.
    FIELD-SYMBOLS:  <fs_field>  LIKE LINE OF lt_fields.
    lr_field_settings ?= lr_config.
    lt_fields = lr_field_settings->get_fields( ).
    READ TABLE lt_fields ASSIGNING <fs_field> WITH KEY fieldname = 'ANSPRECH_DETAILS'.
    IF sy-subrc EQ 0.
      <fs_field>-r_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
      <fs_field>-r_field->if_salv_wd_sort~set_grouping_allowed( abap_false ).
    ENDIF.
    When debugging I can see that the object attributes for sort_allowed and grouping_allowed are changed from 'X' to ' '
    but the running application still allows sorting and grouping for the column 'ANSPRECH_DETAILS'.
    So what did I forget or what is my mistake ????
    Thx for your help.
    Dino Dini

    I got the similar requirement and I tried to do the below way.. it worked for me..
    DATA: lr_field_settings TYPE REF TO if_salv_wd_field_settings.
    DATA: lr_field TYPE REF TO cl_salv_wd_field.
    lr_field_settings ?= lr_table.
    lr_field = lr_field_settings->get_field( 'MATNR' ).
    lr_field->IF_SALV_WD_SORT~SET_SORT_ALLOWED( abap_false
    you can observe in the below image that sort option is not enabled for MATNR in the ALV.

  • Listview column sort

    I have code that allows a user to sort columns in a listview. I use it in many forms around my windows project. It works nicely on all pages and searching through the listview works nicely except for one page the searching is slowed down enormously when
    the column sorting is enabled but sorting works fine. Below is the code for that page.
    I allow the users to search in the search box on top (not showing but it was a textbox the user can type in and it searches in the listview) and then it reloads the listview on bottom based on the search criteria.
    Also the user can click on the column header in the listview and it will sort the columns….
    SEARCH
    private void ProductSearch_TextChanged(object sender,
    EventArgs e)
                ProductsSearch(btnAdvancedSearch.Text);
    private void ProductsSearch(string filterOption)
    StringBuilder sb = new
    StringBuilder();
    string ID = txtItemID.Text.EscapeLikeValue();
    string Name1 = txtItemName1.Text.EscapeLikeValue();
    string Name2 = txtItemName2.Text.EscapeLikeValue();
    string Name3 = txtItemName3.Text.EscapeLikeValue();
    if (ID.Length > 0)
                    sb.Append("ITEMSTRING like '" + ID +
    if (Name1.Length > 0)
    if (sb.Length > 0)
                        sb.Append(" and ");
    switch (filterOption)
    case "Basic Search":
                            sb.Append("' ' + Description
    like '%" + Name1 + "%'");
    break;
    case "Advanced Search":
                            sb.Append("Description like
    '" + Name1 + "%'");
    break;
    if (Name2.Length > 0)
    if (sb.Length > 0)
                        sb.Append(" and ");
    switch (filterOption)
    case "Basic Search":
                            sb.Append("' ' + Description
    like '% " + Name2 + "%'");
                            break;
    case "Advanced Search":
                            sb.Append("Description like
    '% " + Name2 + "%'");
    break;
    if (Name3.Length > 0)
    if (sb.Length > 0)
                        sb.Append(" and ");
    switch (filterOption)
    case "Basic Search":
                            sb.Append("' ' + Description
    like '% " + Name3 + "%'");
    break;
    case "Advanced Search":
                            sb.Append("Description like
    '% " + Name3 + "%'");
    break;
                lsvItems.Items.Clear();
                dtProducts.DefaultView.RowFilter = sb.ToString();
    foreach (DataRow row
    in dtProducts.Select(sb.ToString()))
    ListViewItem lvi = new
    ListViewItem(row["Item"].ToString());
                    lvi.SubItems.Add(row["Description"].ToString());
                    lvi.SubItems.Add(row["Cost"].ToString());
                    lvi.SubItems.Add(row["Price"].ToString());
                    lsvItems.Items.Add(lvi);
    if (dtProducts.DefaultView.Count <= 0)
    Validation.ShowMessage(Main.lblStatus,
    "No items match your search.");
    SORTING
    public Form1()
                InitializeComponent();
                lsvColumnSorter =
    new ListViewColumnSorter(0);
    this.lsvItems.ListViewItemSorter = lsvColumnSorter;
    private ListViewColumnSorter lsvColumnSorter;
    private void lsvItems_ColumnClick(object sender,
    ColumnClickEventArgs e)
               ((ListView)sender).ColumnSort(e, lsvColumnSorter);
    public static
    void ColumnSort(this
    ListView lsv, ColumnClickEventArgs e,
    ListViewColumnSorter lsvColumnSorter)
    // Determine if clicked column is already the column that is being sorted.
    if (e.Column == lsvColumnSorter.SortColumn)
    // Reverse the current sort direction for this column.
    if (lsvColumnSorter.Order == System.Windows.Forms.SortOrder.Ascending)
                        lsvColumnSorter.Order = System.Windows.Forms.SortOrder.Descending;
    else
                        lsvColumnSorter.Order = System.Windows.Forms.SortOrder.Ascending;
    else
    // Set the column number that is to be sorted; default to ascending.
                    lsvColumnSorter.SortColumn = e.Column;
                    lsvColumnSorter.Order = System.Windows.Forms.SortOrder.Ascending;
    // Perform the sort with these new sort options.
                lsv.Sort();
    In this specific page the column sorting code is effecting the searching code.
    What could the problem be?
    Debra has a question

    Hi Debra,
    I suggest you could use the listview to search.
    you could refer to this post:
    http://stackoverflow.com/questions/16549823/filtering-items-in-a-listview
    Use the listView item, not to reload the listViewitem.
    And then i see you using the ListViewColumnSorter class, what is this class? Is it customized?
    If you could share the more details, I could help you better.
    Best 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.

  • Interactive report Sort option

    Hi,
    Is there any way to show "Null always last" as default in Null sorting option of sort window for all interactive reports in entire application/workspace/system.
    I was trying to modify "apex_ns_3_1.js" but I think.....I am confused.
    Please suggest the way if we could do this in safe manner.
    Apex Version: Application Express 3.1.1.00.09
    Current look of sort window:
          Column                   Direction                         Null sorting
    1    -Select Column-       Ascending                        Default
    2    -Select Column-       Ascending                        Default
    3    -Select Column-       Ascending                        Default
    4    -Select Column-       Ascending                        Default
    5    -Select Column-       Ascending                        Default
    6    -Select Column-       Ascending                        Default
    Expected:
          Column                   Direction                         Null sorting
    1    -Select Column-       Ascending                        Nulls always last
    2    -Select Column-       Ascending                        Nulls always last
    3    -Select Column-       Ascending                        Nulls always last
    4    -Select Column-       Ascending                        Nulls always last
    5    -Select Column-       Ascending                        Nulls always last
    6    -Select Column-       Ascending                        Nulls always last

    Sachin,
    Are you not able to add an order by clause to the main query and default the ordering there? Also, when you create an Interactive Report as a developer you should be able to set/save the settings for the default.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

Maybe you are looking for