locked
checkbox ate the start of every row RRS feed

  • Question

  • User1034446946 posted

    Hi

    I have a grid in bootstrap (which presents a table) and I want to put a checkbox at the start of every row, whats the best way to do this, i know I can add it to the first col-lg-1 (or cell) but that means I am 1 col down from my tables information.

    Is there another alterative way?

    Sunday, November 4, 2018 11:34 PM

All replies

  • User839733648 posted

    Hi EnenDaveyBoy,

    According to your description,it seems that you want to get the row information in a table.

    I suggest that you could use the DataTables plugin. And choose to use the checkbox selection.

    A selected row is typically shown in a DataTable by using a highlight background colour.

    It is easy to use and functional. For more about this, you could refer to the link:

    https://datatables.net/extensions/select/examples/initialisation/checkbox.html 

    There are instructions and examples there.

    Best Regards,

    Jenifer

    Tuesday, November 6, 2018 5:33 AM
  • User1034446946 posted

    Thanks for the reply, and visually that would work, however how do i then translate that into a function that works the same as a checkbox?

    I mean it needs to hold a value and allow that value to be submitted when using a form, to a specific form element name.

    Tuesday, November 6, 2018 1:34 PM
  • User475983607 posted

    EnenDaveyBoy

    Thanks for the reply, and visually that would work, however how do i then translate that into a function that works the same as a checkbox?

    I mean it needs to hold a value and allow that value to be submitted when using a form, to a specific form element name.

    You have to understand that it is very difficult to provide accurate assistance without the source code.  We're left with guessing.  Let's start with the basics, what kind of application is this?  Web Forms, MVC, SPA?  Is this a full post back or AJAX (partial post)?

    Is there anyway you can post sample code that illustrates the problem.

    Tuesday, November 6, 2018 2:04 PM