jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Filtering with custom sortFunction: Focus from control lost
Tagged: Filter sorting grid
This topic contains 16 replies, has 2 voices, and was last updated by Peter Stoev 11 years ago.
-
Author
-
Yes, I am trying to implement heck.
When I try to print the id of focused filter, I see that every second time the focused filter id is not correct which is generated. See this:
First try – Focus successfull because the id which is returned by focused filter is correct.
id – jqxWidget3aad454c
element – <input autocomplete=”off” type=”textarea” id=”jqxWidget3aad454c” class=”jqx-widget jqx-widget-bluefin jqx-input jqx-input-bluefin jqx-widget-content jqx-widget-content-bluefin” style=”width: 190px; height: 20px; margin: 4px;”>Second try – Focus failed because the id which is returned by focused filter is not matching with the id of input control
id – 2 jqxWidget3aad454c
element – <input autocomplete=”off” type=”textarea” id=”jqxWidgetce4d8663” class=”jqx-widget jqx-widget-bluefin jqx-input jqx-input-bluefin jqx-widget-content jqx-widget-content-bluefin” style=”width: 190px; height: 20px; margin: 4px;”>Third try – Focus successfull because the id which is returned by focused filter is correct.
id – jqxWidgetce4d8663
element – <input autocomplete=”off” type=”textarea” id=”jqxWidgetce4d8663” class=”jqx-widget jqx-widget-bluefin jqx-input jqx-input-bluefin jqx-widget-content jqx-widget-content-bluefin jqx-fill-state-focus jqx-fill-state-focus-bluefin” style=”width: 190px; height: 20px; margin: 4px;”>Focus failed – ids not matching again
id – 2 jqxWidgetce4d8663
element – <input autocomplete=”off” type=”textarea” id=”jqxWidgetf1ef399d” class=”jqx-widget jqx-widget-bluefin jqx-input jqx-input-bluefin jqx-widget-content jqx-widget-content-bluefin” style=”width: 190px; height: 20px; margin: 4px;”>Should not the focusedfilter should always point to the input element?
If focusedfilter will not work here, can you suggest something with which I can get hold of the input element.btw, this is the code what i have written here:
$(element).on('filter', function(event) { event.args.owner.focusedfilter.focus(); });
focusedfilter is internal API member. It is not necessary to point to the focused filter at the point you do that. It may point to the previous filter when you use it. We would not be able to help you about using internal API and in general you should not do that at all.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.