Search
3647 results 291-300
Forum
- 16th Oct 2024Is there a way to make className apply only to the table cells in a column, and not the header fieldhttps://live.datatables.net/veyasecu/1/ I'm using the className property on my columns to set the text colour of the values in the fields. But it also changes the text colour of the header field. Is there a way to apply a class to just the data fields, and leave the header field with the default text colour?
- 17th May 2024Please tell me how to make merged cells of only one row in a table?DataTables does not support colspan or rowspan in the table body. Allan
- 3rd May 2024Align cells, override individual columns for built in datatypesIn the discussion https://datatables.net/forums/discussion/comment/228325/#Comment_228325 you mentioned: You could assign other classes if you prefer. It looks like dt-type-date will take preference over dt-left regardless of order in the class list, I suspect due to the ordering in the CSS. I'll look at that as well. The user mentioned: The problem is, the custom class is added before the automatic class, so its styles are overwritten, including the for me important text-align. I don't want to override all dt-type-numeric columns in my datatable from being right aligned, but I was hoping I could add the className: 'dt-left' to those columns identified as dt-type-numeric that I want to override. Were you able to review the CSS for precedence.
- 12th Apr 2024editor tries to update all cells when I use AutoFillI'm using Autofill to update fields in my database. Everything is fine on the backend, but when I receive the response on the frontend I have the following error: **DataTables warning: table id=inventario - Requested unknown parameter 'tipoElementoFisicoDescripcion' for row 6779, column 1. For more information about this error, please see https://datatables.net/tn/4** Apparently, Datatable is trying to update the fields that were not sent. Is it possible to tell Datatable to only repaint the marca, modelo, partida item fields and ignore the other fields? const autoFillEditor = new DataTable.Editor({ ajax: '@Url.Action("EditRecord", "ElementoFisico")', idSrc: 'id', fields: [ { name: 'marca' }, { name: 'modelo' }, { name: 'partida' } ], table: '#inventario' }); var table = new DataTable('#inventario', { deferRender: true, processing: true, rowId: 'id', ajax: { url: '@Url.Action("GetRegistroList", "ElementoFisico")', type: 'GET', data: function (d) { d.nivel1Id = $('#Filtro_Nivel1Id').val(); d.nivel2Id = $('#Filtro_Nivel2Id').val(); d.nivel3Id = $('#Filtro_Nivel3Id').val(); d.nivel4Id = $('#Filtro_Nivel4Id').val(); return d; } }, columns: [ { sortable: false, render: function (data, type, full, met) { var result = ''; result = `<a href="/ElementoFisico/Edit/${full.id}"> <i class="far fa-edit"></i> </a>`; return result; } }, { data: 'tipoElementoFisicoDescripcion' }, { data: 'matricula' }, { data: 'ubicacionAntiguoInventario' }, { data: 'ubicacionObservaciones' }, { data: 'observaciones' }, { data: 'fechaAlta' }, { data: 'marca' }, { data: 'modelo' }, { data: 'proveedorCodigo' }, { data: 'fechaFactura' }, { data: 'fechaFinGarantia' }, { data: 'estadoDescripcion' }, { data: 'numeroSerie' }, { data: 'persona' }, { data: 'personaAntiguo' }, { data: 'precio' }, { data: 'departamentoCodigo' }, { data: 'departamentoAntiguo' }, { data: 'elementoInmovilizado' }, { data: 'propietarioCodigo' }, { data: 'partida' }, { data: 'id', visible: false } ], autoFill: { horizontal: false, columns: ':not(:first-child)', editor: autoFillEditor }, ... backend: using (var db = new Database(dbType, dbConnection)) { var editor = new Editor(db, TableName) .Model<ElementoFisicoAutoFillModel>() .Field(new Field("marca").Xss(false)) .Field(new Field("modelo").Xss(false)) .Field(new Field("partida").Xss(false)); editor.PreRemove += (sender, args) => args.Cancel = true; var response = editor .Process(request, culture: "es-ES") .Data(); return response; }
- 6th Nov 2023How to update a table cells responsive modal equivalentAwesome - thanks for letting us know. Allan
- 31st Oct 2023Merge cells in excel for sheet 2.We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here. Cheers, Colin
- 5th Jul 2023col vis changes and adding to cells: rowCallback or columns.render or ?You may need to use $('td span.ui-icon', row).remove(); to keep from building up the info icon each time the visibility changes. Not sure why you think its cludgy but you don't need to initiate the event in initComplete. I would probably pass "page" into draw() instead of false to keep from recalculating the ordering and searching which hasn't changed. For example: https://live.datatables.net/tewajalu/1/edit Kevin
- 2nd Jun 2023Create conditional formatting on dates in cellsKevin, YOU ARE A DIAMOND. :) Thank you so much. I am now able to continue to develop this and add a RAG rating. Joe
- 17th May 2023Update row, only some cellsThanks Allen, I solved with the cell().data() method
- 26th Apr 2023Small gap between fixed header's cells, misaligned fixed headerI've just tried it again - I hadn't clicked that FixedHeader was enabled on the page, since there was no vertical scrolling on my monitor. I am actually seeing the 1px shift that is shown in your screenshot, when FixedHeader is active. It looks like it is probably due to the table border not being applied on the fixed header: I'll need to look into that. Allan