Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog


Channel Description:

Recent Discussions — DataTables forums

older | 1 | .... | 2283 | 2284 | (Page 2285) | 2286 | 2287 | .... | 2326 | newer

    0 0

    There is a lot on here about how to create child table rows that can be expanded but I haven't been able to find any info on simple expandable parent rows. One of my columns contains a lot of text and I would like to have my table so that the rows are no more than one line in width, with a clickable "more" button that expands the table row.

    Any information on this would be much appreciated thanks,


    0 0

    How can I set the option of a datatable editor form with type datetime so that the datepicker have month and year only as shown in the below screen capture? thx


    0 0

    when I use the onReturn submit model, I try three times to edit a field and click the 'Return' Key to submit the change, the page will draw auto

    you can see each time i submit , the page will request the lists data auto.

    But when I use onblur submit mode, I found that the data will changed successfully but the page will not draw auto

    You can see that I try three times , and the page not automatically draw and request the data . this is my datatables options

    formOptions: {
    inline: {
    onBlur: 'submit',
    onEsc: 'close',
    onReturn: 'submit',
    drawType: 'page',
    submit: 'changed'
    }
    }


    0 0

    Hi Allan,
    We encounter a problem when retrieving data with datatables editor when the volume of data is important.
    This happens with an application and MySql database in GoDaddy, where the message returned by the server is ERR_EMPTY_RESPONSE.
    Same application and database on our local servers do not cause problems.
    Could you tell us what can cause this error?


    0 0

    reference http://live.datatables.net/danosiyo/1/edit

    I have a similar form in my application, with select2 as first field and date as 2nd field. I would like the first field to be focused, but don't see the easy way to do this. The calendar pop-up is a bit jarring when the form is displayed, and the user has to manually click on the first field.

    I tried following suggestion in https://editor.datatables.net/reference/api/field().focus() comment to no avail. Not sure best way to put in form-options as you suggest. Shouldn't there be editor initialization option which defines focus? I think this is select2 anomaly because when I tried just type:'select' the focus defaulted to the first field as expected.

    editor.on('open', function() {
        editor.field( 'position' ).focus();
    });
    

    0 0

    0
    down vote
    favorite
    I have a datatable and it is filled with some data but when I want to sort it using a datepicker the whole table disappears and doesnt display anything,but in the console I can see that the data is displaying there like it should only in my page it is not.

    '''
    $('#reportrange').on('apply.daterangepicker', function (ev, picker) {

        var test = picker.startDate.format('M-D-YYYY');
        var test2 = picker.endDate.format('M-D-YYYY');
    
        $.fn.dataTable.ext.search.push(
            function (settings, data, dataIndex) {
    
                var min = test;
                var max = test2;
                var date = parseFloat(data[1]) || 0;
    
                console.log(min);
                console.log(data);
                console.log(max);
    
                if (
                    (min == "" || max == "") ||
                    (moment(date).isSameOrAfter(min) && moment(date).isSameOrBefore(max))
    
                ) {
    
                    return true;
                } else { return false; }
    
    
    
            }
        );
        var table = $('#myTable1').DataTable();
    
        table.draw();
    
    });
    

    '''


    0 0

    Hello everybody.
    First:
    Anybody could explain me the difference betwwen
    1) editor.dependent('individual.id', console.log('tata'), {event: 'change'});
    and
    2) editor.dependent('individual.id', function(val, data, callback) {console.log('toto');}, {event: 'change'});

    In my console 1) make one 'tata' 2) make two 'toto'. Why ?

    Second. When i open the editor, an event 'change' is detecting why ? (so i have 'tata' and 'totox2 in my console. I would like detect changes in certain fields but not when the editor is open. Is it possible?
    Thanks a lot.
    Lionel


    0 0

    I store price in the database as an integer as cents. For example, if a user enters $4.56, I store 456 in the database. I have figured out how to render that in the datatable but I can't figure out how to modify the value in the form so that when the edit form opens, it doesn't display 456, but 4.56. I have set the preInit, preEdit events and they aren't called when the edit button is pressed. On the presubmit, I do the rendering and multiply the result entered by 100 so the correct amount is stored. That works. How do I transform that in the edit form?


    0 0

    I'm not having great success searching for solutions to this issue. Sorry if this question has already been asked.

    I am just trying to run the demo on Oracle 12.2c with Node.js. I suspect I have not created the database table correctly, though I've followed this as closely as I can. I do have some trouble creating the primary key insert trigger, and have to do it through a GUI to get it to run properly. (I think all its missing is referencing old as old new as new in the trigger creation code, though that seems like a ridiculous necessity). so it looks like this

    create or replace trigger datatables_demo_on_insert 
    before insert on datatables_demo 
    referencing old as old new as new 
    
    for each row
    begin
    SELECT datatables_demo_seq.nextval
            INTO :new.id
            FROM dual;
    end;
    

    But other than that, I merely wrap the dates on the insert statements in a to_date() function, and run the SQL exactly as is in the setup guide linked above. But I keep getting this node error when attempting to pull up any of the example pages.

    Unhandled promise error:  [object Promise]Error: Primary key element is not available in the data set
    stack: Error: Primary key element is not available in the data set
        at Editor.pkeyToValue (C:\Users\Mike\dev\db_editor\node_modules\datatables.net-editor-server\dist\editor.ts:688:11)
        at Editor.<anonymous> (C:\Users\Mike\dev\db_editor\node_modules\datatables.net-editor-server\dist\editor.ts:1072:38)
        at step (C:\Users\Mike\dev\db_editor\node_modules\datatables.net-editor-server\dist\editor.js:42:23)
        at Object.next (C:\Users\Mike\dev\db_editor\node_modules\datatables.net-editor-server\dist\editor.js:23:53)
        at fulfilled (C:\Users\Mike\dev\db_editor\node_modules\datatables.net-editor-server\dist\editor.js:14:58)
    

    Any help would be appreciated!


    0 0
  • 12/10/18--03:23: ColReorder - prevent redraw
  • Hi there, I'm using ColReorder extension but each time I move a column the table get redrawed. I'd like to prevent this because I'm doing some manipulation in createdRow callback, and this get's resetted on each redraw.

    Any suggestion? Thanks.


    0 0

    I have added child rows from the example https://datatables.net/examples/api/row_details.html . Now I want to add responsive to the table. I have a problem that when I show the child row, the table is way to wide even for the container. I thought maybe there was some configuration problem but notice that when I remove "nowrap" from the table it is fine. But then the responsive does not work. When I have table class="display responsive nowrap" any long text in a TD in child row breaks the width. Is there a way to fix this?
    Here is closed: https://www.screencast.com/t/OQrJtrus3Bc
    Here it is opened: https://www.screencast.com/t/WOMclzely


    0 0

    Dear Allan!
    I found new problem In fixed row.
    I turn off redraw, and the editor can change edited row data, but not change fixed column data.
    The data is wrote in fixed col, but not refresh.
    If I move with arrow on the fixed column (selected) or click mouse on fixed column (selected), the fixed column refreshing, and see good data.
    (my test table fixed column is second (Revízió). Change any column, press enter, or leawe edited cell, and press selected column Revízó or go back arrow key to Revízo , and You will see my problem.
    You can test:
    http://infoportal-hu.ddns.net:62080/index.php?module=TablePage&ID=21
    You can login:
    email:allandatatables@gmail.com
    Jelszó:
    AllanDatatables
    If you logged in jump again http://infoportal-hu.ddns.net:62080/index.php?module=TablePage&ID=21

    Thanks
    Gyula


    0 0
  • 09/25/18--09:21: "Export to CSV" locking up
  • I'm currently seeing an issue where the "Export to CSV" button is causing the web page to freeze up on one of my pages: https://sne.space. To reproduce the behavior, click the "select all" button then the "export to CSV" button.

    I do have some custom code for the CSV button but it isn't doing too much, just excluding a few columns:

                        extend: 'csv',
                        text: 'Export selected: CSV',
                        exportOptions: {
                            modifier: { selected: true },
                            columns: ':visible:not(:first-child):not(:last-child):not(:nth-last-child(2))',
                            orthogonal: 'export'
                        }
    

    This page has some sister sites with many fewer rows where the export button works just fine: https://tde.space, https://kilonova.space, https://faststars.space, so it appears it the issue might just be the fact that this table has 50k rows. However, there's the possibility that there's a "bad" row in the table causing the export to lock up upon export, but I am not sure how to figure that out.

    Thanks for reading!


    0 0

    Dear Allan!
    I not use paginate, and the server side load too many row when start ajax.
    Can I decrease length parameter when called php?
    in php:

       private function LoadData()
        {
    ....
            if(isset($_REQUEST["start"]) && isset($_REQUEST["length"]) && !isset($_REQUEST["action"]))
            {
                
                $len=$_REQUEST["length"];
    ....
    

    I have 100 columns and i need read only 50 row each ajax call (50*100 field is 5000 field) , but I not can set loading row column number.


    0 0

    Hi,
    I'm trying to test a package created by generator and I have the error

    Missing Method System.String[] System.String.Split(Char, System.StringSplitOptions)

    This error has been already discussed here.
    The error happens either with Nuget package and with downloaded trial and with .net 4.5 and 4.6 (editor version 1.8.1).
    Looking at the stacktrace it seems depends on the Editor DLL :

    [MissingMethodException: Impossibile trovare il metodo 'System.String[] System.String.Split(Char, System.StringSplitOptions)'.]
    DataTables.DtRequest.HttpData(IEnumerable1 dataIn) +0 DataTables.DtRequest._Build(IEnumerable1 rawHttp) +107
    DataTables.DtRequest..ctor(IEnumerable`1 rawHttp) +210
    DataTables.Editor.Process(NameValueCollection data) +297
    DataTables.Editor.Process(HttpRequest request) +127
    EditorGenerator.api.OffersRows.Page_Load(Object sender, EventArgs e) in C:\Users\roby\Desktop\EditorGenerator\EditorGenerator\api\OffersRows.aspx.cs:18
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
    System.Web.UI.Control.OnLoad(EventArgs e) +95
    System.Web.UI.Control.LoadRecursive() +59
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678

    Suggestions are welcome!
    Thanks!

    Roberto


    0 0

    I want to be able to click on a table row, which opens a new page with a new table that is filtered based on the ID of the row I just clicked on in the previous page. How can I do this?

    Previously I have done this exact same thing with two different tables on the same page, using this function:

        oTable.on("click", "tr", function () {
                            var rowData = oTable.row(this).data();
                            var qTable = $('#WTM_LOG').DataTable();
                            qTable.columns(1).search(rowData.TaskName).draw();
                        });     
    

    Problem is, that won't work with a new page. I'm guessing some callback function is needed but I do not know how to do this.
    Thanks,


    0 0

    I'm using datatable editor with inline editing. When I make an edit on a row I use "allIfChanged" to submit my entire row and update a record on my server. Before submit I do some client side field validation using your example at https://editor.datatables.net/examples/api/clientValidation.html . This works well when I'm only doing validation on the current field. However I want to validate all of the fields in the row to know if I should be able to submit or not and showing error message(s) at the fields which fail validation.

    The issue I'm encountering is as follows.

    1) I edit a cell which fires the submit event
    2) editor goes into my "presubmit" event
    3) I validate all my fields and one of the fields in a column im currently not editing on that row fails validation
    4) I add an error to that field using .error(fieldname, mymessage)
    5) I check editor.isError() and return false if any of the fields have errors
    6) at this point datatables does not leave focus on the current field and keeps the input markup in that cell. the submit never happens so the row is never updated, however none of the other errors in the other cells show up so it LOOKS like to the user nothing has happened. When in reality there are errors on the other fields.

    My assumtion is, when inspecting the html of another cell that should show the error, none of the datatable markup for the field errors is there so your editor code has no dom elements to inject the error text in. It looks like this markup only exists on the currently edited field.

    Is there a way to make the errors show up even if the field is not in the inline edit state?


    0 0

    When I use bubble editor on a textarea field, the size of the textarea is much too small for editing. The rows attr is being applied, as well as the cols, but the size of the lightbox isn't changing.

    $('#footnotes-' + projectId).on( 'dblclick', 'tbody tr td:not(:first-child)', function (e) {
                var field = $(this).attr("data-field");
                var type = $(this).attr("data-field-type");
                editor = new $.fn.dataTable.Editor( {
                    ajax: 'blank.jsp?_response=true&_action=save',
                    table: "#footnotes-" + projectId,
                    idSrc: "footnoteId",
                    fields: [ {
                        label: "Code",
                        name: "code",
                        type: "text"
                    }, {
                        label: "Content",
                        name: "content",
                        type: "textarea",
                        attr: {
                            maxLength: "4000",
                            rows: "8",
                            cols: "120"
                        }
                    }
                    ]
                } )
                .on( 'preSubmit', function ( e, d, type ) {
                        d.id = Object.keys(d.data)[0];
                        d.field = field;
                } )
                .bubble( this );
            } );
    

    0 0
  • 12/10/18--09:48: Datatable row.child problem
  • Hi, first of all I apologize for my English, I'm still learning. I have a table with dates, but some of these dates are repeat so i want to join all repeated dates in one row, for that pourpose i created a "fnDrawCallback" function that inserts a new row for every different date, its very similar to this https://datatables.net/examples/advanced_init/row_grouping.html , and for every repeated date i use $(rows).eq(i).hide(); in order to only show the new rows. I need to show more information for every new row, i tried this https://datatables.net/examples/api/row_details.html but it just work with the original rows not with the rows created with "fnDrawCallback".


    0 0

    One of my DataTable displays using ASP.NET needs to show all of the records returned from a stored procedure, anywhere from 5 to 18000, depending on the data. The front-end is ASP.NET MVC and the result is fine on my computer in both IE and Chrome but only shows records greater than approximately 17,600 on a peer's IE. Chrome is fine for them. The code is not using Ajax or doing any paging, although I might consider it to improve performance.

    Is there a meta tag or something similar that needs to be set to resolve this issue? Anything i should be looking at?


older | 1 | .... | 2283 | 2284 | (Page 2285) | 2286 | 2287 | .... | 2326 | newer