Setting ASP.NET Textbox width to datagrid columns width
Hi,
I'm using a datagrid to edit\update content on a database. This is good, but certain column have to be hyperlinks. When I do this and hit the edit command it doesn't replace it with a text box.
I got round this by
<asp:TemplateColumn HeaderText = "HYPERLINK">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:hyperlink Runat = server NavigateUrl = <%#DataBinder.Eval(Container.DataItem, "HyperLink")%> text =<%#DataBinder.Eval(Container.DataItem, "HyperLink")%> ></asp:hyperlink>
<asp:TextBox Runat = server text = <%#DataBinder.Eval(Container.DataItem, "HyperLink")%> Visible = false></asp:TextBox>
</ItemTemplate>
In my edit command procedure, I set the Hyperlink's visible property = false and the textboxe's = true.
What I would like to do is set the textbox's width = to the parent column's width, I don't know the parent columns width at design time.
Anybody got any ideas.
Cheers,
AuldNick:wave: