Re: How to disable the sort-Function of the Tableheader?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: How to disable the sort-Function of the Tableheader?

Jenec

Another issue regarding columns sorting:
I need to implement server side sorting, so Ajax is needed after columns
sorting changes. Which event fires on header clicking (change of the column
sorting)?
I use
qx.ui.table.model.Simple()
with
qx.ui.table.columnmodel.Resize()
Qooxdoo 0.8
--
View this message in context: http://www.nabble.com/How-to-disable-the-sort-Function-of-the-Tableheader--tp13876682p21812020.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to disable the sort-Function of the Tableheader?

Derrell Lipman


On Tue, Feb 3, 2009 at 10:23 AM, Jenec <[hidden email]> wrote:

Another issue regarding columns sorting:
I need to implement server side sorting, so Ajax is needed after columns
sorting changes. Which event fires on header clicking (change of the column
sorting)?
I use
qx.ui.table.model.Simple()

One of the methods of qx.ui.table.model.Simple() is setColumnSortable(). You can set any column to sortable or not using this method.

Derrell
 


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to disable the sort-Function of the Tableheader?

thron7


Derrell Lipman wrote:

> On Tue, Feb 3, 2009 at 10:23 AM, Jenec <[hidden email]> wrote:
>
>  
>> Another issue regarding columns sorting:
>> I need to implement server side sorting, so Ajax is needed after columns
>> sorting changes. Which event fires on header clicking (change of the column
>> sorting)?
>> I use
>> qx.ui.table.model.Simple()
>>
>>    
>
> One of the methods of qx.ui.table.model.Simple() is setColumnSortable(). You
> can set any column to sortable or not using this method.
>  

I think the question was for the *event* that is fired once the user
actually uses the column sort.

T.

> Derrell
>
>  
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to disable the sort-Function of the Tableheader?

Derrell Lipman
On Tue, Feb 3, 2009 at 12:31 PM, thron7 <[hidden email]> wrote:


Derrell Lipman wrote:
> On Tue, Feb 3, 2009 at 10:23 AM, Jenec <[hidden email]> wrote:
>
>
>> Another issue regarding columns sorting:
>> I need to implement server side sorting, so Ajax is needed after columns
>> sorting changes. Which event fires on header clicking (change of the column
>> sorting)?
>> I use
>> qx.ui.table.model.Simple()
>>
>>
>
> One of the methods of qx.ui.table.model.Simple() is setColumnSortable(). You
> can set any column to sortable or not using this method.
>

I think the question was for the *event* that is fired once the user
actually uses the column sort.

Oops, sorry, I misread the question.

The event that's generated is "metaDataChanged" but that may not be as useful as you'd hope. That event is fired for any of the following:
  • column IDs are set via the model's setColumnIds() method
  • column names are set via the model's setColumnNamesByIndex() method
  • column editability is changed via the model's setEditable() or setColumnEditable() methods
  • column sortability is changed via the model's setColumnSortable() method
  • sorting is cleared via the model's clearSorting() method
and finally,
  • a column is sorted via the model's sortByColumn() method (called via click on the header)
You may want to extend qx.ui.table.model.Simple() and provide your own sortByColumn() method like so:

sortByColumn : function(columnIndex, ascending)
{
  this.base(arguments, columnIndex, ascending);

  // fire our own local event called "custom:sortByColumn"
  // and pass it the column index we're sorting on and whether we sorting ascending or descending.
  var data = { columnIndex : columnIndex,  ascending : ascending };
  this.fireDataEvent("custom:sortByColumn", data);
}

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel