Effective method for rendering tabular data
-
I have a scneraio where I need to show the search results in a table. The headers consists of column span in more than one rows. I will try to draw the basic layout here but the actual layout would be more complex than this.
Column1
Column2
Col11
col12
col21
col22
The count of columns will be dynamic. Now, I have two questions. 1. Please let me know if going for a gridview will be appropriate to do this? 2. The data that will be loaded could be huge. I cannot go for a paging approach. Please let me know if we can do a rendering whenever we have the data rather than waiting for full data to be buffered and then render at one shot. I am thinking about features such as response.flush Please let me know any thoughts. Thanks, Afsal
modified on Thursday, August 5, 2010 5:14 AM
-
I have a scneraio where I need to show the search results in a table. The headers consists of column span in more than one rows. I will try to draw the basic layout here but the actual layout would be more complex than this.
Column1
Column2
Col11
col12
col21
col22
The count of columns will be dynamic. Now, I have two questions. 1. Please let me know if going for a gridview will be appropriate to do this? 2. The data that will be loaded could be huge. I cannot go for a paging approach. Please let me know if we can do a rendering whenever we have the data rather than waiting for full data to be buffered and then render at one shot. I am thinking about features such as response.flush Please let me know any thoughts. Thanks, Afsal
modified on Thursday, August 5, 2010 5:14 AM
You can achieve this in GridView in just a few lines of code. Following articles will help you in doing that wholly or partially based on what exactly you need to do. How to merge cells with equal values in a GridView[^] Check MergeHeader portion of this article: Pivoting DataTable Simplified[^] Hope this will help.
Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life. -
You can achieve this in GridView in just a few lines of code. Following articles will help you in doing that wholly or partially based on what exactly you need to do. How to merge cells with equal values in a GridView[^] Check MergeHeader portion of this article: Pivoting DataTable Simplified[^] Hope this will help.
Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life.Well, that's the answer for my first question and I am aware of this can be done with grid view. Can you please give your thoughts to my second question. Thanks.
-
Well, that's the answer for my first question and I am aware of this can be done with grid view. Can you please give your thoughts to my second question. Thanks.
Well, the huge data is not defining the size of your data you want to display. Definitely you can do incremental loading also. You can google a bit to get the info on incremental page load. http://www.vikramlakhotia.com/Incremental_Page_display_using_the_Aspnet_Ajax_Extension.aspx[^] Incremental Page Display Pattern for User Controls[^] The only issue is: if your data has millions of records, clients browser may crash depending on their system configuration.
Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life. -
Well, the huge data is not defining the size of your data you want to display. Definitely you can do incremental loading also. You can google a bit to get the info on incremental page load. http://www.vikramlakhotia.com/Incremental_Page_display_using_the_Aspnet_Ajax_Extension.aspx[^] Incremental Page Display Pattern for User Controls[^] The only issue is: if your data has millions of records, clients browser may crash depending on their system configuration.
Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life.Thanks for the reply. In my case the column count is dynamic. Hence I cannot design a gridview in the aspx.