MVC4中的WebGrid与partialview [英] WebGrid in MVC4 with partialview

查看:60
本文介绍了MVC4中的WebGrid与partialview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在MVC4中创建一个webgrid并放置在partialview ..中,当控制器第一次返回视图时显示结果。

但是webgrid在过滤时没有更新(比如一些像名字一样的Seaching)和一些数据。

即webgrid显示以前的数据



你能给我任何建议或好的文章链接,用于过滤一些数据并将数据填充到webgid。

解决方案

你回发数据时将结果返回到播放webgrid的div中。



我假设回发操作方法将返回带有绑定模型的局部视图。

Hi,

I create a webgrid in MVC4 and placed in partialview..it shows the result when first time the controller return the view.
But webgrid not updating when filtering(like some Seaching with name like..) with some data.
ie the webgrid shows the previous data

can you give me any suggestions or good article links for filtering with some data and fill the datas to webgid.

解决方案

Hi When you postback the data assign the result back in the div in which you are sowing your webgrid.

I assumed that the postback action method will return the partial view with the model binded with it.


这篇关于MVC4中的WebGrid与partialview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆