Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Filter in custom admin module
 
SebboKleine
Jr. Member
 
Total Posts:  23
Joined:  2008-07-10
 

Hi

I used the module creator to create a custom module. At the moment I’m working at the backend. I can successfully show the results (well, actually only the parts I want to show). I even found out about creating a custom renderer for a column, to show what I want. I have some columns where the data should not be shown directly, but depending on certain values in the table-row other things are shown. This works.

Then I’ve found out that there is a similar thing like renderer for filtering. I created this an I’m able to show a dropdown in the filter-row in the grid (talking about backend). Using the getHtml()-method of my filtering class I created the dropdown. There seems to be some strange problem with the “no filter set"-option, but this is not important at the moment.

Somehow I need to tell magento how to apply this filter to the shown results. I do not understand completly how this works.
Are the results filtered using AJAX?
Or does the collection a new database query?
And how can I add my own WHERE-conditions to the query?

Some more information. I use just one table containing all the information (I do not use the magento attribut-value database thing).
And my filter-condition needs to include two table-fields (sql would be WHERE a=x AND b=y).

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top