<p>I have a scenario wherein, for example, I need to repeat a list of US states and display a table of cities and city populations after the name of each state. The design requirement dictates that every outer repetition must be the name of a state followed by a table of cities, and that requirement cannot be changed at this time. Are there disadvantages to nesting a GridView within a Repeater and then binding each repeated GridView during the Repeater's <code>ItemDataBound</code> event? What are some alternative solutions?</p>

[{'answer_id': 50908, 'author': 'CarmineSantini', 'author_id': 2166, 'author_profile': 'https://Stackoverflow.com/users/2166', 'pm_score': 2, 'selected': False, 'text': "<p>If it were me, I'd reverse the question and ask why <em>I should</em> use a GridView,  If you need a bunch of built-in features like paging and sorting, then the GridView might be a good fit.  If you just want tabular data, I'd reconsider.  Why?  Because with GridView you're getting a whole bunch of stuff you won't use, your ViewState will be potentially huge, and your page performance will be slower.  </p>\n\n<p>I'm not a bigot when it comes to GridView, but I only use them when there is a damn good reason.  </p>\n"}, {'answer_id': 50911, 'author': 'Dillie-O', 'author_id': 71, 'author_profile': 'https://Stackoverflow.com/users/71', 'pm_score': 1, 'selected': False, 'text': '<p>In your above scenario, you\'d be better off doing a master-detail style GridView, which will save you the overhead of all those GridView objects that get created.</p>\n\n<p>There are various implementation of it (<a href="http://msdn.microsoft.com/en-us/library/aa479344.aspx" rel="nofollow noreferrer">using a drop down for the master</a>, using a <a href="http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html" rel="nofollow noreferrer">modal popup for the detail</a>, etc.), but the main point is that there are implementations available.</p>\n'}, {'answer_id': 52060, 'author': 'NakedBrunch', 'author_id': 3742, 'author_profile': 'https://Stackoverflow.com/users/3742', 'pm_score': 1, 'selected': False, 'text': '<p>At the very least, hopefully you can turn off ViewState on the GridViews.</p>\n'}, {'answer_id': 52099, 'author': 'Billy Jo', 'author_id': 3447, 'author_profile': 'https://Stackoverflow.com/users/3447', 'pm_score': 2, 'selected': True, 'text': "<p>The best solution I was able to come up with was to nest the GridView in the Repeater. Then I bound each repeated GridView during the Repeater's ItemDataBound event. I turned off their ViewStates, of course, as they weren't required.</p>\n"}]
['https://Stackoverflow.com/questions/50898', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3447/']