We present three models representing the trophic and behavioral dynamics of a simple food chain (primary producers, grazers, and predators) at temporal scales shorter than the scale of consumer reproduction, and at the spatial scales typically employed in field experiments. These models incorporate flexible behavioral responses of organisms to their predators and resources in spatially heterogeneous environments that are open to immigration and emigration. The basic models include passive immigration at all trophic levels, producer growth rates and losses to grazer consumption, grazer emigration rate as a behavioral response to producer and predator densities, grazer losses to predator consumption, and predator emigration as a function of grazer density. We model this system as: (1) a set of ordinary differential equations ('well-mixed model'); (2) a set of partial differential equations describing a population of discrete grazers foraging on discrete patches of primary producers ('discrete-grazer model'); and (3) a set of simulation rules describing the movement and foraging of individual grazers and the growth of primary producers on discrete patches in explicit space ('individual-based model'). The ordinary differential-equation models produced similar results to individual-based models with well-mixed producers, and the discrete-grazer and individual-based models produced similar results when grazers possessed a long-term memory of patch reward rates. The well-mixed and discrete-grazer models thus represent specific, limiting cases of the general individual-based model. Multiple equilibria and sustained oscillations are possible but are less likely in the discrete-grazer and individual-based models than in the well-mixed model, because localized foraging of discrete grazers leads to the rapid development of spatial heterogeneity in producer biomass and, hence, to a decrease in overall primary production. All models predict that stable equilibrium densities of all trophic levels increase with enrichment, provided grazers increase their emigration rates as predator density increases. If increasing predator density leads to decreasing grazer-emigration rates, predator and grazer densities increase, but producer biomass may increase or decrease with enrichment. These results contrast with predictions from models that assume ideal free distributions of grazers and/or predators with respect to their resources. Our models also predict that densities at all trophic levels will increase with increasing producer immigration, and that producer density will decline with increasing grazer immigration and increase with increasing predator immigration. Our qualitative findings on enrichment are used to interpret an experiment dealing with the short-term dynamics of a stream community open to grazers and predators.