Bootstraptable radio and value realization method

Learning BootStraptable has not found the selected and value tutorial of the radio box. Today, write one. As a note

1. Edge: Click the bootstraptable radio button, select the column, take All values ​​to this column.

2. JS code: Bootstraptable initialization BootStrapTable 单选及取值的实现方法

a. Note:

SINGLESELECT: TRUE, // radio Checkbox Column: [{checkbox: true}] // bootstraptable display radio checkbox column
$ (). Ready () {// Bootstraptable Table Data Initialization VAR Table = $ (‘# item_info_table’). Bootstraptable ({URL: ”, Method: ‘POST’, // Get uniqueid: ‘id’, // Binding ID Toolbar: ‘#item_info_toolbar’, // Search Box Binding Search: true, // Search Box PAGINATION: TRUE, // Display Page Code SINGLESELECT: TRUE, // Single Choose Checkbox ShowreFresh: true, // Display refresh button showcolumns: true, // Select the displayed column PageSize: PageList, // Page DataType: Datatype, // Json Sidepagination: Sidepagination, // Serve request Buttonsalign: Buttonsalign, // Refresh, Display Column Button Position Toolbaralign: Toolbaralign, // Search Box Location Column: [{Checkbox: True}, {Title: ‘Item Series’, Field:’ ItemNum ‘, Align:’ Center ‘, Formatter: Function (Value, Row, INDEX) {var URL =’; if (IssingleItem (Value)) URL = ‘
' + row.itemnum + ''; if (ISJOINITEM (Value )) URL = '' + row.itemnum + ''; return url;}}, {Title: 'Project Name', Field: 'ItemName', Align: 'Center'}]}); / ********** Bootstraptable Toolbar Button Event ********* / // [New] button Click on the event $ ('# item_info_btn_add'). Click (function () {$ ('# item_info_modal'). Modal ('show');}); // [Project Project] button Click Event $ ( '#item_info_btn_do'). click (function () {var selectcontent = table.bootstraptable ('getSelection') [0]; if (typeof (selectcontent) == 'undefined') {TOASTR.WARNING ('Please select a column data! '); Return False;} else { (selectcontent); $ (' # item_project_modal '). Modal (' show '); // Project project-based panel}});});     Bootstraptable URL: '
, Backstage JSON Data

Note. Object in the first picture is SELECTCONTENT = Table.Bootstraptable (‘GetselThe data in Ections’) [0] This is to select the data of the Bootstrap radio box to select a line.

{“Offset”: 10, “ROWS”: [{“infoid”: “main_info_1111”, “ItemName”: “AAA Project Group”, “ItemNum”: “JXY160909011S”}, {“infoid”: “main_info_2222”, “itemname”: “BBB Project Group”, “Itemnum” “:” JXY160909012F “}],” Total “: 10}

The above is the Bootstraptable radio and value implementation method for the small series. Help everyone, if you have any questions, please leave a message, Xiaobian will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment