Search
43745 results 7301-7310
Forum
- 14th Apr 2014How can i add sorting and pagination for dynamic tables using data table conceptAm having different tables with same id ,these tables are coming based on data from database. Now i need to implement functionality( pagination and sorting columns ) for these dynamic tables. Thanks, Harikrishna N.
- 11th Apr 2014Multi dimensional array in table rowHi people, I'm having a problem here with datatables. I want to show an array in my row, i'm not the best talking in English, but is something like this. [code] Username | Password | Something user1 | password1 | something1_1 | something1_2 | something1_3 user2 | password2 | something2_1 user3 | password3 | something3_1 | something3_2 [/code] Here is the debug link: http://debug.datatables.net/ayufal As you can see in my debug, the aaData item I want to show like this, is "historicoSituacoes" [code] "historicoSituacoes": [{ "id": 1, "dataSituacao": { "date": "2014-04-04 00:00:00", "timezone_type": 3, "timezone": "America/Sao_Paulo" } }] [/code] In this time I just have one in all, but sometimes it will be more than once. Could someone help-me with this? If you want to see the live page, the link is http://protesto21.com.br/titulo/intimacao/ User: 1oficio Password: p21 Thanks for all and sorry for bad english
- 20th Mar 2014reload Table with new Data when bServerSideI have to load new datatable information on my second request. The input parameters will differ totally on successive requests. From the Ajax respone, I have to clear my old data and load the new one. Also, first request (on initializing datatable) sends pagination, filters parameters but I would like to send all those parameters in my second request as well. Please help me.
- 20th Mar 2014reload Table with new Data using serverside processingI have to load new datatable information on my second request. The input parameters will differ totally on successive requests. From the Ajax respone, I have to clear my old data and load the new one. Also, first request sends pagination, filters parameters but I would like to send all those parameters in my second request as well. Please help me.
- 7th Mar 2014Link Inside of a Table (ember.js)Thanks in advance for the help. I am using ember.js and datatables to display data. I have the datatable working, but I would like for some of the data to link elsewhere. The way I have it setup is I have the json data inside the app and use aoColumns to pull from that data. My problem is that I can only get mData to pull one variable. I want to be able to pull a couple. For example, I want it to pull the image variable to display the image, but then also pull the link variable so when they click on the image it links elsewhere. This is the code I have so far: http://jsfiddle.net/dizbiz/UcDF4/2/ So in the section where I have the "aoColumns", I want some way that i can do the mData of 2 of attributes so I can use the link attribute to create a link on each row. Thanks! David B
- 5th Mar 2014clearing and refreshing tableI have a button to clear the search form fields, so I did: [code]searchTable.clear().draw();[/code] That seems to continue to submit cached data. I've tried a ajax.reload() without much success. Do I need to column().search() with empty data? That seems cumbersome, since I have 4 form fields that I want to clear.
- 3rd Mar 2014How to use Context menu in Datat Table using jqueryI am using datatable and i want to impleent right click option on each so how to implement and which jquery plugin use.
- 3rd Mar 2014Sorting table with Date using a ThemeI currently use this code to sort my dates but it will not sort the years correctly. I have tried many of the suggestions here and they work but something is wrong and I loose my ThemeRoller theme, so I have something wrong. Can anyone help, I do a lot of cut and paste and lean as I go but have not grasped all the punctuation. I need to sort the date - MM-DD-YYYY format while displaying the ThemeRoller theme smoothness. function fnFeaturesInit () { /* Not particularly modular this - but does nicely :-) */ $('ul.limit_length>li').each( function(i) { if ( i > 10 ) { this.style.display = 'none'; } } ); $('ul.limit_length').append( 'Show more<\/li>' ); $('ul.limit_length li.css_link').click( function () { $('ul.limit_length li').each( function(i) { if ( i > 5 ) { this.style.display = 'list-item'; } } ); $('ul.limit_length li.css_link').css( 'display', 'none' ); } ); } $(document).ready( function() { fnFeaturesInit(); $('#example').dataTable( { "bJQueryUI": true, "sPaginationType": "full_numbers", "iDisplayLength": 15, "sLengthMenu": 25, "aLengthMenu": [[15, 25, 50, 100, -1], [15, 25, 50, 100, "All"]], "aaSorting": [[ 4, "desc" ]] } ); SyntaxHighlighter.config.clipboardSwf = 'media/javascript/syntax/clipboard.swf'; SyntaxHighlighter.all(); } );
- 24th Feb 2014Dynamically Add new column for Edit rows in data table asp.net c# 4.5Hello, I am newer in jquery datatable. I have bind a datatable using jqyery datatable. Now i want edit link on each row, I have used below code [code] Actions Name IsActive CreatedOn [/code] [code] $(document).ready(function () { var grid = $('#grid').dataTable({ "bProcessing": true, "sPaginationType": "full_numbers", "bServerSide": true, "sAjaxSource": "../AdminServices.asmx/GetCategories", "fnServerData": function (sSource, aoData, fnCallback) { var jsonAOData = JSON.stringify(aoData); $.ajax({ //dataType: 'json', contentType: "application/json; charset=utf-8", type: "POST", url: sSource, data: "{jsonAOData : '" + jsonAOData + "'}", success: function (msg) { fnCallback(JSON.parse(msg.d)); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.status); alert(XMLHttpRequest.responseText); } } ); }, "aoColumnDefs": [ { "fnRender": function (oObj) { return "Edit"; }, "bSortable": false, "aTargets": [0] }, { "sName": "Name", "bSearchable": true, "aTargets": [1] }, { "sName": "IsActive", "bSearchable": true, "bSortable": true, "aTargets": [2] }, { "sName": "CreatedOn", "bSearchable": true, "bSortable": true, "aTargets": [3] } ] }); grid.fnSetFilteringDelay(1000); }); [/code] [code] [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string GetCategories(string jsonAOData) { Enforce.That(string.IsNullOrEmpty(jsonAOData) == false, "GetaData.GetTenants - jsonAOData can not be null"); CategoriesBL categoryBL = new CategoriesBL(); var jsonSerialiser = new JavaScriptSerializer(); var json = categoryBL.GetAllCategory().AsQueryable(); //var tenantRepository = new ; //var tenants = tenantRepository.AsQueryable(); var dataTablePager = new DataTablePager<Category>(jsonAOData, json); var formattedList = dataTablePager.Filter(); return JsonConvert.SerializeObject(formattedList); } [/code] I am getting below response from web service [code] {"d":"{\"sEcho\":1,\"iTotalRecords\":8,\"iTotalDisplayRecords\":8,\"aaData\":[[\"1\",\"Beauty and Wellness\r\n\",\"True\",\"2/23/2014 11:44:42 AM\"],[\"2\",\"Leisure and Entertainment\r\n\",\"True\",\"2/23/2014 11:44:47 AM\"],[\"3\",\"Travel and Accommodation\r\n\",\"True\",\"2/23/2014 11:44:56 AM\"],[\"4\",\"Commerce\r\n\",\"True\",\"2/23/2014 11:45:02 AM\"],[\"5\",\"Services\r\n\",\"True\",\"2/23/2014 11:45:07 AM\"],[\"6\",\"Businesses\r\n\",\"False\",\"2/23/2014 11:45:11 AM\"],[\"7\",\"Health\r\n\",\"True\",\"2/23/2014 11:45:17 AM\"],[\"8\",\"Useful\r\n\",\"True\",\"2/23/2014 11:45:18 AM\"]],\"sColumns\":\"ID,,Name,,IsActive,,CreatedOn,\"}"} [/code] Issue is like when i am binding with datatable, its generating wired result It generates some thing like below [code] Actions Name IsActive CreatedOn Edit True undefined Beauty and Wellness undefined Edit True undefined Leisure and Entertainment undefined Edit True undefined Travel and Accommodation undefined Edit True undefined Commerce undefined Edit True undefined Services undefined Edit False undefined Businesses undefined Edit True undefined Health undefined Edit True undefined Useful undefined [/code] Not sure why. Can you please help me at earliest? Thanks, Nik
- 22nd Jan 2014jquery datatable plugin aadata format not displaying the tableIam newbie to jquery. Iam working with jquery datatable plugin . I tried to display the array of aadata with datatable but iam not getting datatable displayed, only empty page i could see. Can anyone help me where i went wrong? Below is the code i used. [code] $(document).ready(function () { var Listobj = new Array(); var downloadClick = "<center><img src='Image/Download.png' style='cursor:pointer' onclick=callDownload('','','','') /></center>" var callPlayVedio = "<center><img src='Image/Play.png' style='cursor:pointer' onclick=callPlayVedio('','','','') /></center>" $.getJSON("sources/jsondata.json", function (data) { var dataobj = $.parseJSON(JSON.stringify(data)); $.each(dataobj, function (key, val) { if (key == "contents") { for (var i = 0, l = val.length; i < l; i++) { var obj = val[i]; var auctualSize = ((obj.size) / 1024).toFixed(2) + " kb"; Listobj[i] = new Array(obj.key, obj.lastModified, auctualSize, downloadClick, callPlayVedio, "<center><img src='Image/share.png' style='cursor:pointer;width:16px;height:16px;'/></center>"); } } }); TableDisplay(Listobj); }); }); function TableDisplay(Tablevalues) { alert("sec"+Tablevalues); $('#table_test').html(''); $('#example').dataTable({ "aaData": Tablevalues, "aoColumns": [ { "sTitle": "Files" }, { "sTitle": "Date and Time" }, { "sTitle": "size"}, { "sTitle": "Download"}, { "sTitle": "Play"}, {"sTitle": "share"}] }); }; and my json values are var myjson='[{"isTruncated": "false","nextMarker": "null","marker": "null","prefix": "Mymedia/mysys/","contents": [{"deviceInfo": "null","lastModified": "Thu Dec 26 16:36:42 IST 2013","etag": "d41d8cd98f00b204e9800998ecf8427e","key":"Mymedia/mysys/audio_$folder$","size": "0"},{"deviceInfo": null,"lastModified": "Thu Dec 26 16:36:11 IST 2013","etag": "d41d8cd98f00b204e9800998ecf8427e","key": "Mymedia/mysys/doc_$folder$","size": "0"},{ "deviceInfo": null,"lastModified": "Thu Dec 26 16:36:20 IST 2013", "etag": "d41d8cd98f00b204e9800998ecf8427e","key": "Mymedia/mysys/imge_$folder$","size": "0"},{"deviceInfo": null,"lastModified": "Thu Dec 26 16:36:56 IST 2013","etag": "d41d8cd98f00b204e9800998ecf8427e","key":"Mymedia/mysys/others_$folder$","size": "0"},{"deviceInfo": null,"lastModified": "Thu Dec 26 16:36:32 IST 2013","etag": "d41d8cd98f00b204e9800998ecf8427e","key": "Mymedia/mysys/video_$folder$","size": "0"}],"name": "name", "statusCode": "200","statusMessage": "Success","error": null}]'; [/code]