|
-
Oct 14th, 2003, 05:56 AM
#1
Thread Starter
Lively Member
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
-
Oct 14th, 2003, 06:30 AM
#2
Can't you just set the width to 100%?
BTW - There is a forum specifically for ASP.NET questions.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 14th, 2003, 06:39 AM
#3
Thread Starter
Lively Member
No I've tried the 100% idea, it doesn't have any effect. I'll try reposting on the ASP.NET forum. Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|