yui-datatable

YUI DataTable custom sortFunction issue

I am using a YUI DataTable with a custom sortFunction that strips out HTML code, to sort based on the text content only, rather than the entire string with HTML tags. The problem that I am having is that I need to make use of this sort function on three different columns, and I can not seem to pass the "field" value into my sort function...

How to cache YUI DataSource?

I'm setting up a YUI DataTable with filtering by following the steps on the YUI site However, I am using JSON as the DataSource ResponseType. When I type in a value to filter, the request will be sent to the server again. I find this to be wasteful as all the data has already been retrieved the first time. Is there a way to cache the...

GrailsUI (YUI) data table hover event

Hello, How to make the data table rows change color as hover over it. The YUI example is here link text I tried something like <script> GRAILSUI.myDataTable.subscribe("rowMouseoverEvent", GRAILSUI.myDataTable.onEventHighlightRow); GRAILSUI.myDataTable.subscribe("rowMouseoutEvent", GRAILSUI.myDataTable.onEventUnhighlightRow);...

YUI datatable and date displaying with Firefox

Hi, I am using a datatable loaded via JSON with date like this : 2010-06-03 With Opera and Chrome I have the correct date displayed as 06/03/2010. With Firefox Windows (even in safe mode, without any plug-in), I get a NaN/NaN/NaN. If I use the debug console, I see a valid date, but in Firefox Windows I can see a "Invalid date". Bonus, ...

Sorting datatable column by day name

Hi, I have a datatable with day name column. I want to sort this column by day name e.g. if I have [Friday, Monday,Sunday] sorting should return [Monday ,Friday, Sunday] (ascending) and [Sunday,Friday, Monday] (descending). I tried to use custom sorting but I wasn't able to represent my custom order. Do you have ideas ? Thanks ...

How can I find the checked rows in a YUI DataTable?

I'm using a YUI DataTable with a checkbox column like this: var myColumnDefs = [ {key:"check", label:'', formatter:"checkbox"}, {other columns...} ]; How can I iterate over all the rows that have been checked? UPDATE Here is my current work-around: YUI().use("node", function(Y) { var recor...

Call click event on last clicked row in YUI datatable

Hello, I have a YUI datatable and I have a function which is invoked when I click on a row: ... YAHOO.keycoes.myDatatable = myDatatable; ... myDatatable.subscribe("rowClickEvent", oneventclickrow); var oneventclickrow = function( args ) { ... } I'd like to invoke the function subscribed to rowClickEvent on the row which is curren...

How to use YAHOO.util.Connect.asyncRequest and return results ?

I'm using YAHOO.util.Connect.asyncRequest to get data from database, here is the code : function getCountArticle(contentCurValue) { var handleSuccess = function (res) { var countPubmed = YAHOO.lang.JSON.parse(res.responseText); var contentCountPubmed = countPubmed.totalArticleRecords; alert(contentCountPubmed); //re...

How to make YUI DataTable to be 100% width

My code for creating the data table looks like this: myDataTable = new YAHOO.widget.ScrollingDataTable( "containerDiv", myColumnDefs, myDataSource, {height:"100px",width:"100%"} ); That code produces a table that looks something like this...

Client-side filter of YUI Datatable with select list ?

Can I filter the rows of a static dataset using multiple drop-down menus and a paginated YUI datatable ? http://www.mappingbahia.org/project/iguape_dataset.html ...

multiple yui datatables on the same page

I want to show multiple datatables in a page. I can do this by replicating same code for each tables. But thats becoming so messy and unmanageable. Is there a better way to draw multiple datatables on the same page. Thanks in advance. ...

Issues subscribing to YUI2 DataTable events using 2in3

Does anyone know if there are any known issues subscribing to events fired by a YUI2 DataTable when using with YUI3 2in3? I'm trying to do the following and it's not working: myDataTable.subscribe("initEvent", function(){ Y.log('******** hello from initEvent'); }); Other features of the DataTable seem to be working but I can't s...

Issue with Resizeable Columns in YUI2 DataTable Nested in YUI3 Tabview

I'm having an issue with resizing columns in a YUI2 DataTable when the table is nested inside a YUI3 Tabview. My situation: YUI3 Tabview has 4 tabs. Each tab contains a DataTable that has sortable and resizable columns. The columns in the DataTable of the first tab (the default tab that is displayed after loading the tab view) are sor...

How do I make an XHRDataSource request to a Django server in YUI?

I'm using post, and the YUI documentation example code isn't working. YAHOO.util.Event.addListener(window,"load",function() { var columnDefs = [ {key:"url", sortable:true, resizeable:true}, {key:"title", sortable:true, resizeable:true}, {key:"count", sortable:true, resizeable:true} ]; this....

Why can't I programmatically scroll to a given row in a YUI ScrollingDataTable?

It appears the ScrollingDataTable scrollTo method is broken. As an alternative, I've tried scrollIntoView() and jQuery's scrollTop on the correct dom elements without luck. I've also tried YAHOO.util.Scroll and it doesn't work either. The datatable is in a div that has a vertical scrollbar. jQuery version: var scrollToThisRow = dataT...

Avoid page flickering when updating a YUI DataTable

I am using jlinq a library for extending linq to json and hence i filter my json data. Consider i have a json data that draws a yui datatable on page load with 100 rows. I am doing a clientside filter which will reduce my json data and i am now redrawing the same datatable. What happens is it works pretty well but with an annoying flicke...

How do I show character count in YUI when editing a cell?

Hi, In the YUI datatable I want to limit the number of characters a user can type into one of the cells. I know how to properly display the amount using a formatter, but is there a simple way to change the editor box to show a "124/500" character count limit? ...

asyncRequest, YUI 2.7, status=404 not understandable behaviour

hi, I'm using YUI to talk to server on Grails framework. Using asyncRequest, I successfully passed a parameter to my server and have the server println the result. However, the callback function still insists "not found" on the statusText. Could some one enlighten me on what might be wrong with my code? thanks! var deleteCallback ...

Change YUI Datatable height dynamically

YUI Datatable allows to set the height during construction like: new YAHOO.widget.ScrollingDataTable("xyscrolling", myColumnDefs, myDataSource, {width:"30em", height:"10em"}); Is there YUI api to set Datatable height programmatically on already existing instance? ...

YUI Datatable failing in IE for large datasets

I have a DataTable and DataSource (YUI 2.6). The XHRDataSource connects to an XML producing address which is a servlet, where I write the XML out onto the response via the PrintWriter. Servlet: String data = dataProvider.fetch(request.getPathInfo()); int cLen = data.length(); response.getWriter().append(data); response.setContentLengt...