Fixed as follows, for anyone else doing this;
Code: Select all
Step1. Create a private variable in the <Control>.ascx.cs file
21: private int colsDrawn=0;
Code: Select all
Step 2. Create a new public function
public void drawn() {
this.colsDrawn++;
}
Code: Select all
Step 3. Overwrite/Modify the 'GetRow()' function
183: public string GetRow(bool open,bool horizontal) {
184: bool isHorizontalMode=(_Orientation=="HORIZONTAL");
185: if(!(isHorizontalMode==horizontal)) {
186: if(open&&(colsDrawn==0))
187: return "<tr>";
188: if(this.colsDrawn==3) {
189: this.colsDrawn=0;
190: return "</tr>";
191: }
192: }
193: return string.Empty;
194: }
Code: Select all
Step 4. Add a call to drawn() to the .ascx page
29: </td>
30: <GetRow>
31: <drawn>
32: </ItemTemplate>
30: %= GetRow(false, false) %
31: % drawn(); %
...between the markup tags.
Oh, i've also hard coded it to draw 3 columns, you could either change the line:
188: if(this.colsDrawn==3) {
to check against a different number, or to 'this.Columns' to use the argument provided by the user control parameters.