CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 7/28/2004 9:50:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
raif
Asp.Net User
editing style in template columns7/28/2004 9:50:22 PM

0/0

Hi, I don't know if this is the right place to post but I'm not getting any answers in the "beginner" forums and I reall need a fix.
my problem is that I can't set any style features in my template columns in a datagrid. the databoud columns are fine but the templates are just default and consequently totally difference in apearance. Specifically what I want to do is set the width of column, the font size, and the wrap. I have tried putting these in the html as I do for databoud columns but it has no effect. here is some code

<asp:TemplateColumn HeaderText="Slot 1" ItemStyle-Font-Size="10" ItemStyle-Width ="105" ItemStyle-Wrap ="False">
<ItemStyle Width="150px"></ItemStyle>
<ItemTemplate>
<table border="0">
<tr>
<td align="left">Trainer</td>
<td><%# databinder.eval(container.dataitem,"s1tr")%></td>
</tr>
<tr>
<td align="left">Client</td>
<td><%# databinder.eval(container.dataitem,"s1cl")%></td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table border="0">
<tr>
<td align="left">Trainer</td>
<td>
<asp:dropdownlist runat = "server" id="trainers1" datavaluefield ="contname" DataTextField = "contname" DataSource ="<%#trainerlist%>"/></td>
</tr>
<tr>
<td align="left">Client</td>
<td>
<asp:DropDownList Runat = "server" id = "clients1" DataValueField = "contname" DataTextField = "contname" DataSource = "<%#clientlist%>"/></td>
</tr>
</table>
</EditItemTemplate>
</asp:TemplateColumn>

Any help would be greatly appreciated.
Thanks
Raif
master4eva
Asp.Net User
Re: editing style in template columns8/5/2004 6:10:16 PM

0/0

Have a look into CSS. They are your best friend:

<style>
td.someClass {
width: 200px;
...
}

And the reason that you are probably not getting answers is because you are too vague. Maybe some clarification?
-- Justin Lovell
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET Developer's JumpStart Authors: Paul D. Sheriff, Ken Getz, Pages: 648, Published: 2002
ASP.NET Kick Start: Kick Start Authors: Stephen Walther, Pages: 624, Published: 2002
Essential ASP. NET with Examples in C# Authors: Fritz Onion, Pages: 432, Published: 2003
Visual Basic .NET Power Coding Authors: Paul Kimmel, Pages: 708, Published: 2003
Beginning ASP.NET 2.0 Databases: Beta Preview Authors: John Kauffman, Thiru Thangarathinam, Pages: 427, Published: 2005
Beginning ASP.NET 2.0 E-commerce in C# 2005: From Novice to Professional Authors: Cristian Darie, Karli Watson, Pages: 681, Published: 2005
OOoswitch: 501 Things You Wanted to Know about Switching to OpenOffice. Org from Microsoft Office Authors: Tamar E. Granor, Scott Carr, Sam Hiser, Pages: 310, Published: 2003
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Sams Teach Yourself ADO.NET in 21 Days Authors: Dan Fox, Pages: 656, Published: 2002

Web:
The Datagrid Revisited: Editing a Live Database in Template Columns In one of my previous contributions I demonstrated a way to edit database data in the asp.net datagrid component. Before and after that many more (good) ...
Vincent Sibal's Blog : WPF DataGrid: Stock and Template Columns Well, depending if you are in an editing state or not, the column will ... by the Foreground property set by each of the element styles. Template Columns ...
Using RadEditor as editor in template column of RadGrid - telerik ... ... and bind its Content property directly in the grid edit column template. ...... the HEAD tags of the page with the grid and editor: