页面上的网格视图太多:设计和性能影响 [英] Too many gridviews on page : Design and Performance implications

查看:67
本文介绍了页面上的网格视图太多:设计和性能影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个时间表应用程序,该应用程序允许学生从星期一到星期六选择课程,并且有三个不同的时段,例如MORNING,AFTERNOON和EVENING.这就导致了18种不同的日期"和时间"组合.学生将被允许在每个时间段选择一个科目,并且在一周内只能选择一次该科目.为了实现这一点,我使用了 18个gridviews ,并在其中填充了由大学管理的科目,这些科目在一个时段内最多为3个科目(例如MONDAY MORNING).我使用互斥复选框在一周内仅执行一次主题选择.

实施工作正常,但我担心性能,因为在每个时间段学生选择检查或取消选中复选框时,都会在选择和取消选择时隙期间进行大量回发,从而使某些业务逻辑得以执行.

1>页面上有这么多的gridviews是一个不好的设计吗?
2>有办法改善吗?此设计的替代方案吗?

I am working on a timetabling application that allows students to choose classes from Monday to Saturday and there are three different time slots like MORNING, AFTERNOON and EVENING. That leads to 18 different combination for Day and Time. Student will be allowed to choose one subject per time slot and any subject can only be selected once during the week period. To implement this I used 18 gridviews and populate them with subjects run by college which is at the most 3 subjects during one time slot (e.g. MONDAY MORNING ). I am using mutually exclusive checkboxes to implement subject selection only once during the week.

Implementation is working fine but I am worried about performance as there are lot of postbacks during the time slot selection and deselection as every single time student check or uncheck a chekcbox the postback occur to make certain business logic to execute.

1> Are having that many gridviews on a page is a sing bad design ?
2> Is there a way to improve this ? Any alternative to this design ?

推荐答案

Gridviews是ASP.NET提供的最重的控件之一.
因此,如果在单个时间点上显示18个网格视图,则可能会导致性能问题.

我建议适当地对您的girdviews进行分组,也许是明智的选择,并且一次显示2到3个gridview.当用户具有这些选择时,则移至下一个选择.您可以使用多视图.
Gridviews are one of the heaviest controls provided by the ASP.NET.

So if at a single point of time, you are showing 18 gridviews then it would cause performance issue.

I would suggest, group your girdviews properly, might be day wise, and show 2 to 3 gridview at a time. when a user with these selection, then move to the next selections.You can use multiview.


您可以创建星期一至星期六的第一个组合框.

选择之后,您可以制作另一个组合,包括早晨",下午"和晚上".

在此筛选条件之后,您可以显示您的gridview,并且Brij也是正确的,一次显示2到3个gridview,然后提供next-prev功能来显示它.
You can make first combobox of Monday to Saturday.

After that selection you can make another combobox of MORNING, AFTERNOON and EVENING.

After this filter crieteria, you can show your gridview and Brij is also correct that show 2 to 3 gridview at a time then give the next-prev functionality to show it.


这篇关于页面上的网格视图太多:设计和性能影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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