| Page 1 of 1 | [ 4 posts ] |
|
Is there a way to access the id attribute for the table element generated by yui datatable?Does yui datatable set the id attribute for the table element?
|
|
You can use method getTableEl() to reach the actual <table> element and from it, anything you want.
|
|
Satyam,
Butting into another thread, but I think that I was trying to find the same thing just now. I have a Radio Button in my Data Table that I use to signal "Delete." ( I could use a check box, but I think that the concept is the same. ) I then pop up a Dialog that asks if they really want to delete that record. If they delete it, no problem. However, if they choose not to delete the record, I would like to turn off the radio button or check box or whatever. It code that is connected directly to the "radioClickEvent" or "checkboxClickEvent", this is easy, because I can manipulate oArgs.target.checked. However, the Cancel button of the Dialog is not connected to oArgs.target, as far as I know. Could I use your answer above to change the value in the HTML Table and would that be correct for the Data Table, or is there a better way? Thanks, Brian |
|
Normally, you would store the value (checked or not) of the checkbox or radioButton on the Record. That would ensure that even if at a later time you decide to do pagination, the state of the rows selected on one page is kept across the DataTable, whether those rows are visible or not. Thus, restoring the clear state of those checkboxes can be done by going through the RecordSet and on each Record, using setData to set that field to false and then re-render the DataTable.
|
| Page 1 of 1 | [ 4 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