Two sheets of code (I use the plugin, you can go online directly download http://issues.wenzhixin.net.cn/bootstrap-table/):
<Divclass= "Container"style= "float:left;width:500px;height:341px"> <DivID= "Toolbar"> <ButtonID= "Remove"class= "Btn Btn-danger"Disabled=""> <Iclass= "Glyphicon glyphicon-remove"></I>Delete</Button> </Div> <TableID= "Table"Data-toolbar= "#toolbar"Data-search= "true"Data-detail-formatter= "Detailformatter"Data-minimum-count-columns= "2"Data-show-pagination-switch= "true"data-pagination= "true"Data-id-field= "id"data-page-list= "[Ten, +, +, all]"Data-show-footer= "false"data-side-pagination= "Server"Data-url= "./system/dealer_obtainmachandname"Data-response-handler= "ResponseHandler"> </Table> </Div> <!--Right Linkage section - <Divclass= "Container"style= "float:left;width:500px"> <TableID= "Tablelink"Data-toolbar= "#toolbar"Data-detail-formatter= "Detailformatter"Data-minimum-count-columns= "2"data-pagination= "true"Data-id-field= "id"data-page-list= "[Ten, +, +, all]"Data-show-footer= "false"data-side-pagination= "Server"Data-url= "./system/dealer_obtainaillermes"Data-response-handler= "ResponseHandler"Data-query-params= "Getpatientid" </Table> </Div>
The arrow points to my newly added function (note that it is not written like this data-query-params= "Getpatientid ()")
Then add a row click event to the first table:
$ (' #table '). On (' check.bs.table ', function (e, row, $element) { // console.log (Row, $element ); // Getpatientid (); $ (' #tablelink '). Bootstraptable (' refresh ', {url: "./system/dealer_obtainaillermes"});
This is added to the plug-in corresponding module:
In this way, each time you click on the Refresh Method of table 2, and then pass the corresponding ID, and then update the table according to the data sent from the background.
A
Cascade two bootstrap-table. A table displays the relevant data by clicking on a row of this table, passing the corresponding ID, and refreshing the other table.