jQWidgets Forums
jQuery UI Widgets › Forums › DataTable › Show / Hide Columns and Add label to Filter
Tagged: datatable, show columns, table
This topic contains 6 replies, has 2 voices, and was last updated by Martin 6 years, 5 months ago.
-
Author
-
Hi, I created an advanced filter Datatable. I’d like to dynamically show / hide columns. How can I do it quickly? The second thing is, I would like to add a label to the filter fields that this field belongs to a given column, that is when the input filter give the name of the column. Can I count on help? Thank you in advance!
Hello dzimen,
Here is an Example of jqxDataTable with ‘advanced’ filter mode.
You can use theshowColumn
andhideColumn
methods for dynamically showing and hiding columns, as shown in the example.
Can you clarify more or show an example of what label you would like to add?
The column name is displayed in the dropdown of the advanced filter.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/I want to add either a place label next to the input field, or add a placeholder in the middle of the input. Look at the picture there I gave the placeholder: https://zapodaj.net/6f355c27b6dfc.png.html
Hello dzimen,
Here is an Example of how you can add the name of the column
to the corresponding input in the filter row.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/After adding the code, I have an error that I can not recognize some elements or that “Let” has no support in the current version of Javascript … Look photo: https://zapodaj.net/b4873d2ffd747.png.html
Additionally, the edition has to edit the database
Hello dzimen,
Just from the screenshot it is not clear what may be the issue. You can also use
var
instead oflet
.
For editing the database, you should use theupdateRow
callback of the source:updateRow – callback function, called when a row is updated. If multiple rows are added, the rowid and rowdata parameters are arrays of row ids and rows.
Example:updateRow: function (rowid, rowdata, commit) { // synchronize with the server - send update command // call commit with parameter true if the synchronization with the server is successful // and with parameter false if the synchronization failed. commit(true); }
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.