Custom select box resets after list length change
Custom select box resets after list length change
This is a branch from my recent post: http://datatables.net/forums/discussion/9786/calculating-column-total-for-all-non-filtered-entries#Item_4
In short, I have a huge list of data that is sorted for a client to easily see sold products with the company. I have a custom select box (Sold and Unsold) appended after the Show (10 / 25 / 50 / 100) select box in the client_grid_length div. They sit side by side as shown below:
http://i47.tinypic.com/14toh3s.png (ignore arrows and text over the body, as that was for my last post)
The issue I am having is that when I change the amount shown in the list, it resets my Sold / Unsold select box back to the first index (Sold). This however does not trigger the jQuery (selectbox).change() event - thank god because that would mean the client would have to change the select box back to Unsold to view the unsold items again. This is misleading to the client though because they see "Sold" selected in the select box but are actually viewing Unsold.
I moved my custom select box out of the DataTable container and it does not reset my custom select box back to the first index when the list amount is changed; However - for structural purposes - I'd like to keep it where it is. I've tried resetting it back to the correct option when fnDrawCallBack is fired, but it does NOT work.
Any ideas??
Thanks again! And special thanks to allan for... well.. everything.
In short, I have a huge list of data that is sorted for a client to easily see sold products with the company. I have a custom select box (Sold and Unsold) appended after the Show (10 / 25 / 50 / 100) select box in the client_grid_length div. They sit side by side as shown below:
http://i47.tinypic.com/14toh3s.png (ignore arrows and text over the body, as that was for my last post)
The issue I am having is that when I change the amount shown in the list, it resets my Sold / Unsold select box back to the first index (Sold). This however does not trigger the jQuery (selectbox).change() event - thank god because that would mean the client would have to change the select box back to Unsold to view the unsold items again. This is misleading to the client though because they see "Sold" selected in the select box but are actually viewing Unsold.
I moved my custom select box out of the DataTable container and it does not reset my custom select box back to the first index when the list amount is changed; However - for structural purposes - I'd like to keep it where it is. I've tried resetting it back to the correct option when fnDrawCallBack is fired, but it does NOT work.
Any ideas??
Thanks again! And special thanks to allan for... well.. everything.
This discussion has been closed.