You have a bug there - the field you're trying to use doesn't belong to the data source. If you want to filter by fields of InventItemGroupItem table, you need a query data source for InventItemGroupItem. You're currently using InventTable data source, therefore your code is adding a filter to a field of InventTable that has the same ID as ItemGroupId field has in InventItemGroupItem table. That's clearly not what you want.
You need to join InventItemGroupItem to InventTable and add the range to InventItemGroupItem. You can either add a regular form data source and set the join in the designer, or you can modify just the query at runtime (by using adding QueryBuildDataSource by addDataSource()).