Need advice in setting column's width of a grid inside a repeater



Dear All:
Banckgroud: I have a datagrid which lives inside a repeater. Which is
working fine. What i need is to dyanamically set the column width of the
grid (which lieves inside the repeater). Is there any way, we accomplish
this? Any advice on this would be greatly appreciated.


---BEGIN PART Of ListApp.aspx --->

<asp:Repeater ID="repL" DataSource='<%#
Container.DataItem).ApplicationID)%>' runat="server">
<tr><td align="center"><%# ((RMS.Lib.DAO.Application)
Container.DataItem).Name %></td></tr>

<asp:datagrid id="GridLS" DataSource='<%#
GetSGrid(((RMS.Lib.DAO.Application) Container.DataItem).ApplicationID) %>'
runat="server" ShowHeader="False" Width="100%" BorderColor="#ffffff"
autogeneratecolumns="false" HorizontalAlign="Center"
<alternatingitemstyle CssClass="datacell2"
HorizontalAlign="Center" Font-Size="smaller" />
<ItemStyle CssClass="datacell" HorizontalAlign="Center"
Font-Size="smaller" />
<asp:BoundColumn DataField="col1"></asp:BoundColumn>
<asp:BoundColumn DataField="col2"></asp:BoundColumn>
<asp:BoundColumn DataField="col3"></asp:BoundColumn>

---END PART OF ListApp.aspx ----

---BEGIN PART OF CODE Behind ListApp.aspx.cs ----
protected DataTable GetSGrid(string id)

// BEGIN :: Trying to set the width of the column of the grid lives
inside the repeater
// folowing are the technique i was trying, but didn't work
// Question: is there any way we can set the width of the grid inside a
int width1 = 5;
int width2 = 70;
int width3 = 25;
GridLS.Columns[0].ItemStyle.Width=new Unit(width1,UnitType.Percentage);
GridLS.Columns[1].ItemStyle.Width=new Unit(width2,UnitType.Percentage);
GridLS.Columns[2].ItemStyle.Width=new Unit(width3,UnitType.Percentage);
// END :: Trying to set the width of the column of the grid lives inside
the repeater

string sql = @"SELECT col1,col2,col3 FROM my_table where id="+id;
Summary s = new Summary();
DataSet ds = s.GetSiteList(sql);
DataTable gridSrouce = (DataTable) ds.Tables[0];

return gridSrouce;

---END PART OF CODE Behind ListApp.aspx.cs ----