C# 表格以列为行
我想知道 C# 中是否可以有一个表,允许其中一列显示为一行,因此每个记录实际上是两行。
我正在尝试创建一个文档搜索引擎。我希望文档属性(例如文档标题、创建日期)放入列中,并且在列中也包含文档的摘录,但是我觉得如果摘录位于新行上(类似于 google 的方式),会更合适显示带有页面摘录的结果。对于如何实现这一目标的任何建议,我将不胜感激。我目前正在考虑创建一个 jQuery 组件并以这种方式加载它,除非有更简单的方法?下面是我对表格外观的描述:
-----------------------------------------------
|Col 1 | col 2 | col3 |
-----------------------------------------------
|Data | data | data |
|Contents of col4 |
-----------------------------------------------
|Data | data | data |
|Contents of col4 |
-----------------------------------------------
I am wondering if it is possible to have a table in C# which allows one of the columns to appear as a row so each record is effectively two rows.
I am attempting to create a search engine for documents. I would like document properties such as document title, date created to be put into columns and also have an extract of the document in a column as well however I feel it would be more appropriate if the extract was on a new line similar to how google displays results with a page extract. I will be grateful for any advice on how this could be achieved. I am currently considering creating a jQuery component and loading it in this way unless there are any easier methods? Below is a depiction of how I imagine the table to look:
-----------------------------------------------
|Col 1 | col 2 | col3 |
-----------------------------------------------
|Data | data | data |
|Contents of col4 |
-----------------------------------------------
|Data | data | data |
|Contents of col4 |
-----------------------------------------------
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将“摘录”存储在数据库中其自己的列中(每一行都是一个“文档”)。然后,在您的视图中,您可以将其显示为 HTML 表中自己的行。不需要 jQuery。
Store the "extract" in it's own column in the database (each row is one "document"). Then, in your view, you can have it be displayed as it's own row in the HTML table. No need for jQuery.