instead of deleting the row i just want to delete the specific column data

instead of deleting the row i just want to delete the specific column data

TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

hi Allan ,

in editor delete button functionality instead of deleting the entire row i just want to delete the specific column data.

thanks in advance.

Answers

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    Do you mean you want to set the data for those columns to be null? If so, that's an edit action and you could use the edit() method in a custom button to do that.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi alla,

    I want to add one checkbox as column to select all rows. After select all rows Edit and Delete button should be enable.can u please let me know.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    There isn't a built in option for a checkbox to select all rows, but you could use the rows().select() method to do that with your own checkbox:

        table.rows().select( true );
    

    will select all rows for example.

    You might also be interested to look into the buttons that Select provides which does include a "select all" option - see this example.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0
    edited July 2016

    Hi alla,

    I am created one custom button for deleteing the specific column data set to null.But i am not able to get the data to serverside once row is selected.can you please let me know how can i do that.Please find the below code what i am written the code for removing the row data and set to null.

     var table= $('#example').DataTable( {
    buttons: [
     {
                          text: "Remove Discount",
                          editor: editor,
                          action: function ( e, dt, node, config ) {
                            var newData = table.rows().data();
                             $.ajax({
                             url: "http://localhost:7001/JqueryExample/hello.do?method=getRemove",
                              idSrc:  'rowid',
                              data:newData ,
      });   
    

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    I'm afraid I don't fully understand. Do you want to get the data from the selected rows? The documentation for how to do that is available here.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    yes allan I want to get the selected rows data to serverside through ajax call

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan,

    please find the attached image i am able to see an error in jquery.dataTables.min.js.please let me know what is the isse.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    Without a test case showing the issue, I'm afraid I don't know. At the very least I would need to know the back trace for the error, the DataTables initialisation options and any API methods that were used when the error is triggered.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan,
    I am implemented one checkbox in header to select the all check boxes.But i am not able to select only filter data.can you please let me know how can i implement that functionality in jquery. please provide the function to select only filter data.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    But i am not able to select only filter data

    Do you mean you want to select the rows that are in the table filtered, and not the ones which have been filtered out? The rows() method with the selector-modifier object can be used for that. table.rows( { search: 'applied' } ).nodes() for example.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan i tried this function it's wrking fine thanks allan
    table.rows( {order:'index', search:'applied'} ).select(true).nodes();

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan,

    I want to add the validation for inline editing.can you please let me know how can i do that validation for client side in jquery.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    There is an example of how to do client-side validation here.

    Note that Editor focuses on server-side validation since the validation has to be done there anyway.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan,

    I want to send only changed value from Edit entry(Jquery) to server side.I don't want to get complete row data and iterate the values.please let me know how can i do that.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    Use the submit option of the form-options object. See also the formOptions.main documentation for how to set a default for that option for the main lightbox editing.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi allan,

    In datatables even if there is no data in UI the page is looking like still loading how to ignore the loading.. tab if data is null.For reference please find the attached file.

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    That suggests that there is a Javascript error occurring. If null is being returned, that would cause an array before it isn't a valid array of data. For an empty data set, return an empty array.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi Allan,

    I want to hide one column in edit entry window in editor .can u please let me know how can i do that?

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Answer ✓

    I presume you want to keep it for the create view? If so, you need to use show() and hide() to show and hide the field and the initCreate and initEdit events to know when to call those methods.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi Allan,

    when i clicked the inline edit for any any cell i want get the header name how can i do that in jquery can you please let me know..

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin

    Use cell().index() to get the index information (including the column index) and then column().header() to get the header cell, which you can read its content from.

    The full, searchable, API reference is available here.

    Allan

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    Hi Allan,

    After applying filter when i clicked 'x' data is not getting filtered or cleared.please let me know what is the issue?

  • TELE2_NL2TELE2_NL2 Posts: 17Questions: 2Answers: 0

    In internet explorer having that problem but it's working in google chrome it's working fine allan.
    But i want to test my application in IE only.please let me know

This discussion has been closed.