Having trouble using Gyro Checkbox Plugin, is there an alternative?

Having trouble using Gyro Checkbox Plugin, is there an alternative?

Sageis1Sageis1 Posts: 53Questions: 9Answers: 0
edited February 2021 in Free community support

Here is the test Case: http://live.datatables.net/weluyanu/38/edit

What i would like is everything on the HTML side to stay the same, its structure is needed when posting data, the "Value" field of the input tag is what get submitted. (Asp.Net)

Another thing is the Gyro Plugin overrides the current style of the HTML, which is also not needed.

Basically What I want is for the format of the check boxes to remain as the original, and leaving the HTML side of setting the Value property of the input tag, and for there to be a select All button which is currently there and working(so that's fine)

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    What i would like is everything on the HTML side to stay the same, its structure is needed when posting data, the "Value" field of the input tag is what get submitted. (Asp.Net)

    I'm not sure what you are looking for and why the Gyrocode plugin causes a problem. Can you be more specific and explain what to look for in your example?

    For changes or questions about the Gyrocode checkbox plugin you will need to ask the developer. Click on the Report a Bug button on his website.

    I'm guessing you are using it for the select all checkbox. The alternative is to create your own select all checkbox so you can style it the way you want. Search the forum, there are examples of creating your own.

    Kevin

  • Sageis1Sageis1 Posts: 53Questions: 9Answers: 0

    okay @kthorngren , This is the template of the input tag defined in the original HTML:

    <input class="form-check-input" type="checkbox" name="SelectedUserIds" value=1>
    

    As you can see the "value" property and the "name" property have associated data attached to them

    now when applying the Gyro Plugin the html is change like so:

    "<input type="checkbox" class="dt-checkboxes" autocomplete="off">".
    

    I dont want it to change remove the value property and name Property.

    Also with the current Html I have is it possible to make the Third Column a drop down row.

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923
    edited February 2021 Answer ✓

    Sounds like you will want to generate your own checkboxes instead of using the Gyrocode checkboxes or the ones generated by Select checkboxes. You can then create your own event handler to select the rows when checked. See this example for the recommended way to handle row events.

    Also with the current Html I have is it possible to make the Third Column a drop down row.

    Datatables does not restrict what you put in a cell. It just needs to be properly formatted HTML and you can create event handlers to do what you need. You can probably fund examples on the forum of what you want to do.

    Kevin

  • Sageis1Sageis1 Posts: 53Questions: 9Answers: 0

    okay cool @kthorngren , i got a plan on the check boxes now, for the second part, using a single column as a detailed row to the associated row its attached to, What do i search for that case.

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    for the second part, using a single column as a detailed row to the associated row its attached to

    Sorry I think I misunderstood your question before. Thought you wanted to add a column with a select drop down list. Didn't we move the detail row to the last column in one of your other test cases? Just move that column definition where you want.

    Kevin

  • Sageis1Sageis1 Posts: 53Questions: 9Answers: 0

    @kthorngren I've searched around and found this solution for hiding the row and using it as a row detail, http://live.datatables.net/jifapite/1/edit.

    Thanks for the help.

    You actually also helped someone with the same problem heres the original link ( https://datatables.net/forums/discussion/61307/how-to-define-parent-child-detailed-row-without-ajax-data-source-using-data-table-and-bootstrap-4 )

  • Sageis1Sageis1 Posts: 53Questions: 9Answers: 0

    Noticed link has full stop at end, remove it from url then it will work.

This discussion has been closed.