c# - how to fill webGrid through dropdown selection in mvc 3? -


hi; want fill webgrid after selection dropdownlist. can not. i've been selected drb1 , filling drb2. bu can not fill webgrid1 after selection drb2. can not fing sample googling.how fill webgrid? aim descripted below:

enter image description here

you can achieve call action on selecteditem change of dropdown

inside action can use selectedtext of dropdown , use entity framework calling sql

once data return tranform model , return in view

the view need  @model ienumerable<product> <div> @{   var grid = new webgrid(model, defaultsort:"price"); } @grid.gethtml() </div> 

some nice example :

http://msdn.microsoft.com/en-us/magazine/hh288075.aspx http://weblogs.asp.net/andrebaltieri/archive/2010/11/01/asp-net-mvc-3-working-with-webgrid.aspx


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -