dhtmlxGrid and filtering

Hi! I am needing to used Grid to connect to a database, which is working great, but I don’t want it do display EVERYTHING in the database on load. How do I filter so that only certain rows are displayed in the grid?

If you are using “connectors” to link grid to DB, you can use render_sql and provide any necessary rules as part of initial config

Instead of

$grid->render_table(“some_table”,“id”,“field1,field2,field3”)

You can use

$grid->render_table("SELECT * FROM some_table WHERE some_criteria = some_value ",“id”,“field1,field2,field3”)


By using WHERE part of expression you can define any necessary set of rules.