Web窗体表格控件对于此方案 [英] Web Forms Tabular Control for this Scenario

查看:320
本文介绍了Web窗体表格控件对于此方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个asp.net网站,两列的布局。在左侧,我们有菜单项。根据菜单项的点击,权项的更改内容(能见度切换)。右侧的内容表格数据。该表提供基于选择的菜单项的详细信息。

环保:Visual Studio 2010中,ASP.Net 4.0

服务:WCF服务(我们拥有的业务控制)

现在,我已经决定的行为,只要表现好充分的灵活性。

要求

  1. 该表需要分页和排序。该表应该是能够做到的服务器端分页(或自定义分页)作为加载在第一个载荷的所有数据将是一个性能损失。

  2. 的右侧的内容的装载应部分呈现。我计划控制的基础上点击菜单项各种元素的可见性。会有在页面各处10表。因此,表中的数据应仅按需加载。当页面被加载首次,它应该是只在一个表具有数据。其他的表应该是空白的。

  3. 我可以使用经过验证的开源jQuery插件

有很多方法可以实现它开始使用网格视图。什么是最合适的控制上面的表格功能?


阅读

  1. <一个href="http://stackoverflow.com/questions/4779647/paging-by-using-dynamically-created-html-table-in-asp-net-4-0">paging在asp.net使用动态生成HTML表格4.0

  2. 高性能网站 http://video.yahoo.com/watch/1040890/ 3880720

  3. ASP.NET性能清单 http://msdn.microsoft。 COM / EN-US /库/ ms998596.aspx

  4. 高效翻阅数据(C#)的大量<一href="http://www.asp.net/web-forms/tutorials/data-access/paging-and-sorting/efficiently-paging-through-large-amounts-of-data-cs" rel="nofollow">http://www.asp.net/web-forms/tutorials/data-access/paging-and-sorting/efficiently-paging-through-large-amounts-of-data-cs

解决方案

听起来像MVC3和剃刀意见给我一份工作。我已经做了与我的网格的局部视图类似从而使局部视图的排序标题和分页控件,所有这一切都是(或者包含)排序方向Ajax.ActionLink项目该排序传球,每行网页等args设置为我GoToPage,SortGrid和ChangeRowsPerPage行动。

我也有一个PagingModel,一个SortHeaderModel其中包含一个PagingModel,并为各个表,其中还包括PagingModel模型。随着表名作为寻呼模式的特性,这些Ajax.ActionLinks可以传递回他们所谓的行动,和一个开关模块可以用来传递其他参数的构造合适的模型,然后将该模型被传递到与数据的新鲜页面栅格局部视图。

它的工作原理,我从来没有过任何东西,但数据的当前可查看网页浏览器。

I am developing an asp.net website with two column layout. On the left side we have menu items. Based on the click of the menu item, contents of the right item changes (visibility is toggled). Contents of the right side are tabular data. The tables provide details based on the selected menu item.

Environment: Visual Studio 2010, ASP.Net 4.0

Service: WCF service (We have control over the service)

Now, I have full flexibility of deciding the behavior so long as the performance is good.

Requirements

  1. The tables require paging and sorting. The tables should be able to do server side paging (or custom paging) as loading all data in the first load will be a performance hit.

  2. The loading of "right side content" should be partial rendering. I am planning to control the visibility of various elements based on the clicked menu item. There will be around 10 tables in the page. Hence the table data should be loaded on demand only. When the page is loaded for the first time, it should be having data only in one table. Other tables should be blank.

  3. I can use proven open source jQuery plugins

There are many ways to achieve it starting with use of Grid View. What is the best suitable control for the above tabular functionality?


READING

  1. paging by using dynamically created html table in asp.net 4.0

  2. High Performance Websites http://video.yahoo.com/watch/1040890/3880720

  3. ASP.NET Performance Checklist http://msdn.microsoft.com/en-us/library/ms998596.aspx

  4. Efficiently Paging Through Large Amounts of Data (C#) http://www.asp.net/web-forms/tutorials/data-access/paging-and-sorting/efficiently-paging-through-large-amounts-of-data-cs

解决方案

Sounds like a job for MVC3 and Razor Views to me. I've done something similar with a partial view for my grid which in turn renders partial views for the sort headers and the paging controls, all of which are (or contain) Ajax.ActionLink items which pass sort by, sort direction, rows per page, etc. args to my GoToPage, SortGrid, and ChangeRowsPerPage actions.

I also have a PagingModel, a SortHeaderModel which contains a PagingModel, and models for the individual tables, which also include PagingModel. With the table name as a property in the paging model, the Ajax.ActionLinks can pass that back to the actions they call, and a switch block can be used to pass the other parameters to the constructor for the appropriate model, and then that model is handed to the grid partial view with the fresh page of data.

It works, and I never pass anything but the currently viewable page of data to the browser.

这篇关于Web窗体表格控件对于此方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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