Search
18878 results 651-660
Forum
- 15th May 2014How to create a link in one column data item that leads to dounload link put in other column's dataI solved my question, no body cared to answer though !! thanks for all who tried to help... I'm using Ver. 1.9.4 and here is my datatable definition for the claimed case: $('#example').dataTable( { "aaData": aDataSet, "aoColumnDefs": [{ "bVisible": false, "aTargets": [1] } ], "aoColumns": [ { "sTitle": "Title"}, { "sTitle": "File","sWidth":"300px",}, { "sTitle": "Doc Type","sWidth":"60px","sClass": "center"}, { "sTitle": "Publisher" ,"sWidth":"70px","sClass": "center"}, { "sTitle": "Year","sWidth":"30px","sClass": "center"}, { "sTitle": "Pages","sWidth":"30px","sClass": "center"}, { "sTitle": "Format", "sClass": "center", "sWidth":"30px", "fnRender": function(obj) { var sReturn = obj.aData[1]; return "<a href='files/"+sReturn+"' target='_Blank'>"+ obj.aData[6]+"</a>"; } } ] } ); So that the rendered content in the last column will hold the link to the file name stored in the hidden second column. Thanks for all
- 4th Apr 2014Create a master-detail tableThere are only 2 rows in the first table with reference to the second table. The first and the third row are there.
- 10th Mar 2014Create links calling JS methods in a table cell (undefined method error)Well, I'm responding my own question for the reference of whoever might encounter him-/herself in a similar situation: The "external" function should be defined outside the $(document).ready(function(){}); block, then everything will be working as expected: [code] < script> function selectClient(a){ alert(a); } $(document).ready(function(){ $("#search-user-form").submit(function(e){ ... [/code]
- 7th Feb 2014How to create datatable "two_button" pagination with custom Previous and Next images?Oops - yes. Good point :-) Allan
- 12th Dec 2013Create custom cell content using callbackYup - not disagreeing with you at all! The new API in DataTables 1.10 will accept jQuery objects as well :-). In fact, the new API is massively better than the on fn* methods... (imho of course!) Allan
- 9th Dec 2013trying to create a plugin that would let you re-size columns and carousel horizontal scrollingso should i not work with sWidth at all ?
- 11th Oct 2013On Create Default Column filter AJAX CallThat's all I want!!! I couldn't find that option, thank you!
- 28th Jun 2013Dynamically create table headers and contentvar headers = ["sTitle : FSNe", "sTitle : Project Name", "sTitle : Description", "sTitle : PrjTrk #", "sTitle : SAP #"] ; You've got an array of strings there. You want an array of objects like in the documentation ( http://datatables.net/ref#sTitle ): [code] [ { sTitle: "FSNe" }, { sTitle: "Project Name" }, ... ] [/code] Allan
- 9th Jun 2013How to create a drop down list from a JSON object array item - UpdatedIf you want the select list in the table, then yes, that looks like a good way of doing it to me, and probably what I would have suggested. Arrays might be slightly faster that string concatenation when building the string (and use join ) in older IE versions, and save you a line or two, but likely not a noticeable amount if the table is relative small. Allan
- 9th Apr 2013SOLVED - What is the best way to create a datatable for a table with dynamic structure?I was hiding the DIV that contained the datatable before manipulating it's structure and data. Once I stopped hiding the datatable, it worked well. Looks like datatable needs the table to be visible in the first place for proper redraw to work.