Search Box
Search Box
Hello,
I'm new to jQuery and Data tables.
I have two issues here.
1. On load of the table I would like to filter the content by passing default value to the search box.(I load a popup which holds the table, the popup will be displayed on click of a button. So I would like to set the default search text on click of the button)
2. I have a table with check box on each row. On select of the check box a text box will be visible and I can enter value in it. On Unselect the text box will disappear. Up to here it is fine. But the problem is, through data tables pagination, when I select records across different pages I'm able to retrieve the row Id's that are selected across all the pages. But the text box value inside the column of that row is coming as undefined. Please help me in this. Hope I'm clear on this.
Thanks
I'm new to jQuery and Data tables.
I have two issues here.
1. On load of the table I would like to filter the content by passing default value to the search box.(I load a popup which holds the table, the popup will be displayed on click of a button. So I would like to set the default search text on click of the button)
2. I have a table with check box on each row. On select of the check box a text box will be visible and I can enter value in it. On Unselect the text box will disappear. Up to here it is fine. But the problem is, through data tables pagination, when I select records across different pages I'm able to retrieve the row Id's that are selected across all the pages. But the text box value inside the column of that row is coming as undefined. Please help me in this. Hope I'm clear on this.
Thanks
This discussion has been closed.
Replies
Please help me how to solve the second one.
Allan
Can you please guide me on my second issue I posted earlier. Retrieving selected data across all pages while using datatable.
How are you trying to read the text field? You need to use fnGetNodes() to get all TR elements in the table regardless of paging. From there you can use standard jQuery / DOM methods.
Allan
I'm using fnGetNodes() to get all TR elements. And, I'm able access all the TR which are in different page. But, the textbox value that is in different pagination page is coming as undefined. Only the current pagination page textbox vales are accessible.
Help me.