开发者

C# table with column as row

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                             |
-----------------------------------------------


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜