| Page 1 of 1 | [ 3 posts ] |
|
thanks in advanced for helping. hopefully i'm just missing something here or using the wrong function.
i have a data table with dynamic data delivered from the server. I want to make one particular column pass in a different "sort" value when the user clicks on the column header. Below is example of responseSchema with three fields and then I have the column defs below. The only difference here is that when the user clicks the "field" column, I want the data table to pass a string into the sort parameter so I can sort it differently on the server. I suppose I could build the URL dynamically but i'd rather just use sortOptions: {field: "field,field3"}. So far this is not working. Do I need to build it dynamically? Code: myDataSource.responseSchema = { resultsList: "records", fields: [{key:"Id",parser:"number"},"field","field2"], metaFields:{ totalRecords:"totalRecords" } }; var myColumnDefs = [ {"key":"Id","label":"D","sortable":true}, {"key":"field","label":"Changed By","sortable":true,formatter:this.formatOwnerUrl, sortOptions: { field: "field,field3" }}, {"key":"field2","label":"Change Date","sortable":true, sortOptions: { defaultDir: YAHOO.widget.DataTable.CLASS_DESC }} ]; |
|
Nevermind on this post. I ended up correcting it server side but it would be a nice feature for the future.
|
|
Have you tried building a custom sort function for the DataTable? Check out the reference at http://developer.yahoo.com/yui/datatable/#advancedsort for starters.
Are you trying to first sort by one column, and then by another, based upon user column heading clicks? |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group