So I have a table and within each cell, is a gridview. Basically it's tables within a table. Right now, the columns in each gridview have arbitrary widths, depending on the length of each text in each cell. I want to make them all the same so it's nicer to look at.
In a loop, I make each gridview, bind to a cell, bind to a row, and appending to the outer table. I tried to add this statement after I bound the gridview to a dataview to make the first columns consistent in width:
gvTemp.Columns[0].ItemStyle.Width = Unit.Pixel(400);
But I get an error saying that 0 was too big of an index, even though the gridview is not empty.
Am I using the wrong methods? Am I placing the code in an incorrect location?