How To: Triggering multiple table data loads from a select dropdown

How To: Triggering multiple table data loads from a select dropdown

wd8tawd8ta Posts: 1Questions: 1Answers: 0

Link to test case: Nothing yet
Debugger code (debug.datatables.net): None
Error messages shown: None
Description of problem:

This isn't a problem issue, but a design/implementation question. Background: In process of converting an asp.net webforms site that uses gridviews and client wants features that datatables provides. The application has multiple pages that use Bootstrap tabs and in each tab content there is a gridview that is dependent on the value of a select that is global to the page. When the user selects something in the dropdown, it reloads the gridviews. So what I'm asking is how do you load the datatable in each tab based on the selected key value in the select mimicking the behavior that the client is used to with gridviews? I maybe haven't gone deep enough into the forums to see if there's an example of this behavior and I'm still searching but would like to have guidance. Thanks

Answers

  • kthorngrenkthorngren Posts: 21,322Questions: 26Answers: 4,948

    This example shows BS tabs each with a separate Datatable. You can use Ajax loaded data like these examples. Use the ajax.data option as a function to send the value of the select input, similar to this example. You don't need to enable server side processing to use ajax.data.

    Let us know of further questions.

    Kevin

  • kthorngrenkthorngren Posts: 21,322Questions: 26Answers: 4,948

    I forgot to add to use ajax.reload() to reload the Datatables in your select event handler.

    Kevin

Sign In or Register to comment.