I have a GridView bound to some XML data that looks like this:
<Root>
<Column1>
<Item1 type="l1style">Item 1</Item1>
<Item2 type="l2style">Item 2</Item2>
<Item3 type="l3style">Item 3</Item3>
</Column1>
<Column2>
<Item4 type="l1style">Item 4</Item4>
<Item5 type="l2style">Item 5</Item5>
</Column2>
<Column3>
<Item6 type="l1style">Item 6</Item6>
<Item7 type="l2style">Item 7</Item7>
</Column3>
</Root>
In some cases, though, the Column3 node isn't there.
I'd like to render something like:
<table>
<thead>
<tr>
<th scope="col">Column1</th>
<th scope="col">Column2</th>
<th scope="col">Column3</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li class="l1style">Item 1</li>
<li class="l2style">Item 2</li>
<li class="l3style">Item 3</li>
</ul>
</td>
<td>
<ul>
<li class="l1style">Item 4</li>
<li class="l2style">Item 5</li>
</ul>
</td>
<td>
<ul>
<li class="l1style">Item 6</li>
<li class="l2style">Item 7</li>
</ul>
</td>
</tr>
</tbody>
</table>
How can a Repeater control be used inside of a GridView, or is there a better way to accomplish this? Thanks.