Author Topic: Column header filtering behavior  (Read 2651 times)

rickpqu

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
Column header filtering behavior
« on: June 15, 2016, 03:02:07 am »
Hi, at http://, if you click "Variant" tab on the top left corner, and scroll the table to the bottom, and then type "r" in the column header filtration box under the column "HUGO symbol", then the table is filtered correctly, but I'd like to move the focus on the table to the top row of it. How can I do this?

I tried colModel's listeners, but it didn't seem to have any effect. For example, I tried the following.

var cm = grid.pqGrid('option', 'colModel');
cm[9].filter = {type: 'textbox', condition: 'contain', listeners:[ {'keyup': function(evt, ui) {alert('here');} ]};
grid.pqGrid('option', 'colModel', cm);

Then, typing a letter in the HUGO symbol column header filter box does not open the alert dialog.



Edit: url removed.
« Last Edit: June 20, 2016, 04:06:21 pm by paramquery »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6323
    • View Profile
Re: Column header filtering behavior
« Reply #1 on: June 15, 2016, 09:53:15 pm »
I assume you mean scroll the view to show first row without losing focus in the filter textbox.

It can be done by scroll to first row in the filter event callback which can be added in the initialization object.

Code: [Select]
filter: function(){
this.scrollRow( { rowIndxPage: 0 });
},

rickpqu

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Column header filtering behavior
« Reply #2 on: June 15, 2016, 10:07:50 pm »
Thanks. That worked.