Newbie question about radio buttons in a cell
Newbie question about radio buttons in a cell
Hi,
Just discovered this and have it working in my app without issue. I am running into a issue with having a radio button in the first column and using pagination or the filtering.
What happens is when I search the datatable and then select a new radio button from the filtered down list, and then
clear the filter the original selected radio button is back and the one I selected from the search results is not checked.
I have a jquery click event for the radio buttons that does a ajax post to the server and sets the ID of the button in the session, it also updates a heading on the page.
Similar thing happens with pagination enabled, but in this case if I go tot he second page the radio buttons don't respond to the click event, and this depends on how the sorting is set, if I have it sorted Asc it's the first page that does not work, and if I go to the second page the radio buttons click events work.
Hope I am explaining this right. I looked in the forums and could not see anything that would help with this.
I am generating the table in my templates (mako using Cherrypy) like this:
${row['coname']}
Thanks,
Snorkel
Just discovered this and have it working in my app without issue. I am running into a issue with having a radio button in the first column and using pagination or the filtering.
What happens is when I search the datatable and then select a new radio button from the filtered down list, and then
clear the filter the original selected radio button is back and the one I selected from the search results is not checked.
I have a jquery click event for the radio buttons that does a ajax post to the server and sets the ID of the button in the session, it also updates a heading on the page.
Similar thing happens with pagination enabled, but in this case if I go tot he second page the radio buttons don't respond to the click event, and this depends on how the sorting is set, if I have it sorted Asc it's the first page that does not work, and if I go to the second page the radio buttons click events work.
Hope I am explaining this right. I looked in the forums and could not see anything that would help with this.
I am generating the table in my templates (mako using Cherrypy) like this:
${row['coname']}
Thanks,
Snorkel
This discussion has been closed.
Replies
Are you using server-side processing or DOM based data? With server-side you would need to maintain the checkbox state on the client-side since the rows are recreated on every draw.
Allan