I have set some filters for a Grid via adding TextFields to the header row and now I wanted to set programmatically some values for some of these fields (I still don’t know if that would automatically trigger the Grid to reload its contents filtered accordng to the values in the box but I don’t mind because I’ve already applied them at the DataSource level).
My initial approach was to get the header cell with a HeaderRow.geCell(“columnId”), and after that I planned to do a .getComponent() to that header cell, as all that’s inside it is the stated TextField. But when trying so I get the following exception:
“Cannot fetch Component from a cell with type TEXT”
Trying to solve the mistery, I started a debugging session and discovered that Grid.getComponent() does this check in the first place; that is, if the “cellState.type” is that one from the header row, it throws that exception.
Why this behaviour? And how I could overcome this, if possible?