Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 81691 articles
Browse latest View live

how get column index server-side

$
0
0

hello how get column index or column name when search all column server side c#


how to draw borders on all table cells?

$
0
0

is it possible to do this when the table is initialized, or can this be done only with the help of the css? Tell me an example code.

Datatables with Java, displaying more than 100000 rows of data

$
0
0

Hi, i've trying to implement datatables with my web application but i'm having trouble finding any useful guides to use them both. I've tried to implement AJAX but to no avail and cant seem to get it working.

I only can display my data by iterating through the java arraylist and then display individually onto the jsp page. I can't seem to do it if its in JSON.

I'm also trying to implement pagination, so as to not load all data at once, but i assume i can only do that if the rest of my data is in JSON.

Can anyone help

Clear [loadingRecords] message when exception happen

$
0
0

Hi everyone,

Currently I'm customizing the error message that pops up when some exception happen in the errorMode extension as code below:

$.fn.dataTable.ext.errMode = function (settings, helpPage, message) {
    Message.failMessage("My customized error message...");
};

But there is one thing I also would like to customize.
When loading data and an exception happen, the dataTable will show whatever is been set here

language: {
     loadingRecords: "Please wait - loading..."
}

and the dataTable keeps showing this message even after clicking on the popup.

My question is, how can I clean this message or give another message when an exception happen?

is there such a property like

language: {
     loadingRecordsError: "Sorry! Error loading data."
}

Thank you very much in advance guys!

Regards,
Alex

Datable inside tabs problem

$
0
0

I am using datatables inside tabs but problem is that when in click on view list tab then detail list tab's elements display below datatables

Pagination in dataTable 1.10.*: dont reset container on change current page

Trigger function on editor update/create/remove

$
0
0

Good morning

Looked through the API but couldn't find a hint how to add a custom function in case a row is created, updated or removed...must be pretty simple I guess (o;

I have two tables, one with orders on top, and one with editable rows at bottom showing the order items...so if I add/change/delete a row belonging to an order, the orders table should be updatd/reloaded as the total amount changes.

thanks in advance
richard

Freeze/lock first row in datatables excel export file

$
0
0

Hi, is it possible to freeze/lock first row in datatables excel export file? Any built-in option or custom code?


Filter columns with server-side processing

$
0
0

Hello,

I try to set up columns filtering with server-side processing.
I know this is a question that have been already answered a few times, but all the solutions doesn't work for me.

This is my DataTable :

 /*
     * Creation of the datatable
     */
     mosRuleTable = $('#rulesTable').DataTable( {
            "sAjaxSource": "/mos/marketordersender/rules",
            "bServerSide" : true,
            "bProcessing" : true,
            "bDestroy" : true,
            "paging":   true,
            "ordering": false,
            "info":     false,
            "aoColumnDefs": getMOSRuleDef(editMode),
            "oLanguage" : {
                "oPaginate" : {
                    "sFirst" : "First",
                    "sLast" : "Last",
                    "sNext" : "Next",
                    "sPrevious" : "Previous"
                }
            },
            "sPaginationType" : "full_numbers",
            "bFilter" : true,
            "bSort" : false,

When i try to use table.columns().every( function () { to set up the filtering It say that columns is not a function.

Can someone help me ?

SearchPanes in separate Div

$
0
0

Hi, how can I place SearchPanes in a separate div container vertically?
The dom parameter is already used for the Buttons extensions.

<div id="content">
    <div id="dataTable"><table id="example" class="display" style="width:100%"></table></div>
    <div id="searchPane"></div>
</div>

And is it possible to add a event handler when a item in pane is clicked?

How to set Two different type of pagination on a single table?

$
0
0

is it possible to have two different types of pagination on a single table if yes then how?

[Editor] Uploading a .msg file directly to Editor deletes it from the Outlook

$
0
0

First of all, please note I'm not really experienced with any of this, but I think there's a little problem with the Upload feature on Editor and I'll try to be as detailed as possible.

When uploading to Editor a .msg file directly from Outlook (Windows Application) to Chrome, the file is uploaded successfully but the e-mail disappears from Outlook (it moves it to Deleted Items folder). This doesn't happen when using Edge browser - it works as it should.

From what I can find about this, is related to a global event called event.dataTransfer.dropEffect .
This event is somehow defined as move instead of copy. What I can't understand is why on Edge this seems to be defined as copy, but as move on Chrome.

My idea to solve this was to search for event.dataTransfer.dropEffect on datatables.Editor.js but I can't seem to find this declared in order to change it from move to copy.

I tried to add it to dragDrop.on, but it doesn't seem to work too.

dragDrop.on( 'drop', function (e) {
                if ( conf._enabled ) {
                    e.originalEvent.dropEffect = "copy";
                    Editor.upload( editor, conf, e.originalEvent.dataTransfer.files, _buttonText, dropCallback );
                    dragDrop.removeClass('over');
                }
                return false;
            } )

Does anyone has any idea how this can be solved?
My Chrome version is 79.0.3945.130

Related articles about this subject, i know it's different scripts, but it seems to be a general problem:
- https://support.google.com/chrome/thread/14094827?hl=en
- https://answers.microsoft.com/en-us/msoffice/forum/all/drag-and-drop-works-however-deletes-email-can-we/865f60c3-7980-4465-8a19-4d60b0ae5aba?rtAction=1575537469456&page=2

Multiple ID Columns

$
0
0

Hello all,

Can Datatables handle an ID that consist of several columns? Can "idSrc" have multiple integers as an input?

Kind regards,
Florian

Protect deployed webapp based on editor plugin

$
0
0

Good evening (o;

As I, or my employer are due to soon to buy the editor plugin I would like to ask:

When I deploy a web project to a customer with datatables/editor....
would the customer be able to just copy over the datatable/editor js/css stuff for his own projects?

Or is there any way to protect this besides using ioncube?

thanks in advance
richard

Database updated but not editor

$
0
0

I think I can explain this on the server side, but essentially, the Datatable isn't updated after an edit...at least not immediately. For instance, lets say the original value is 234, and I change it to 235 and save, the value in the data on the datatable shows 234. I then change it to 236 and save, after that, the datatable shows 235.

The server is C#, MVC, with SQL server. I decide to insert a breakpoint in the PreEdit and PostEdit inside of the controller as well as breakpoint in each. Inside the PreEdit, and expanding 'e' I see that the correct number has been submitted, 235.

editor.PreEdit += (sender,e) =>
{
...
}

editor.PostEdit += (sender,e) =>
{
...
}

I set a breakpoint right before the data is returned to the view (which is the Datatable), after resuming the code from PreEdit and it shows the old value of 234 after I scroll to the record I am editing (#1247 - I have quite a few rows. I would have expected it would have grabbed the latest value from the database, which is the one I see in the preedit.

I also view PostEdit and look at the form data (expanding 'sender'), and it is correct as well. Odd, though, in expanding 'e', it shows the first row of the Datatable, not the one being edited.

Another breakpoint, right before the result is returned back to the view shows that the value is still 235. The dataset being sent back, instead of the 1200+ rows, is just the first one.

Anyway, TLDR: The correct information is being sent, to the MVC controller, and the database is being updated, but the old data is being sent back to the view.

Thoughts?


Datatable is not loading when include header page

$
0
0

Datatable is working fine, but when i include the custome header page the datatable won't load. And how can i load the template's style to the datatable. ?

Thanks.

Global search and column search together in datatables.

$
0
0

I've server side srcipt written for both global search and individual column search but don't know how to make it work in datatables. Currently when I search in both global and individual column I get an error as shown in screenshot. Does any one know how to make it work ?

Thanks

Cascading lists in Editor: please explain

$
0
0

Hello! I recently started studying DataTables. Stopped with dependent fields. I looked at a lot of examples and still a lot is unclear.

There is a classic example:
https://datatables.net/blog/2017-09-01

It is often pointed at. And it is important for me to understand.
It would be nice to decipher it a bit:
1. I don't understand: how many tables are there in the Database? As far as I understand 4:
Table 1- for filling in
Table 2 - " Continents»
Table 3 - " Countries»
Table 4 – " id_Сontinent-id_ Country»
2. I really want to see the "JavaScript" code
3. editor.dependent ('continent', '/ api/countries' );
the Second argument «/ api/countries» what is it?
4. Do I understand correctly that in this example there are actually two Server script (PHP files)? I'd like to see both.
I'm sorry, I'm still at the beginner level and I need your help.

Custom Total Export XLS

$
0
0

I am exporting the table with the totals.
On video I bring it in format with a comma and I don't point but then when I export on xls it doesn't put the commas in the right place
HERE

Why Inline editing taking more space and flickering?

$
0
0

I have created datatable with inline editing.
I have few question and issue.

  1. while clicking the column of inline edit it's taking extra space from top and flickering.
  2. How to get the data after mouse move out from the inline edit mode. Actually i want on onmousemove inine edit mode should close and the same it has to call one method with editable data.
  3. How to delete the entire row data and get the deleted data details.
  4. how to fecth the data immediatel after saving.
Viewing all 81691 articles
Browse latest View live