Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 7th, 2004, 09:00 AM
Authorized User
 
Join Date: Aug 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to macupryk Send a message via Yahoo to macupryk
Default Easy question on a datagrid.

I have the following going across:

I would like to have this not going along the columns

but instead each line. along each line

UserID :
Store:
Password:

instead of having

UserID Store Password

I tried to enter <BR> between </asp:TemplateColumn>

<asp:TemplateColumn>

UserID Store Password


<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="&lt;img src=images/Ok.gif border=0 align=absmiddle alt='Save changes'&gt;"
CancelText="&lt;img src=images/Cancel.gif border=0 align=absmiddle alt='Cancel editing'&gt;" EditText="&lt;img src=images/icn_edit.gif border=0 align=absmiddle alt='Edit this item'&gt;">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:EditCommandColumn>

<asp:TemplateColumn Visible="TRUE" HeaderText="UserID">
<ItemTemplate>
<asp:Label Text='<%# Convert.ToString(DataBinder.Eval(Container.DataIte m, "UserID")) %>' Runat="server" ID="lblUserID">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>

<asp:TemplateColumn HeaderText="Store">
<ItemTemplate>
<asp:Label Text='<%# Convert.ToString(DataBinder.Eval(Container.DataIte m, "STORENAME")) %>' Runat="server" ID="lblSTORE">
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:DropdownList id="insertStores" runat="server" DataSource='<%# BindStores() %>' DataValueField="StoreID" DataTextField="STORE">
</asp:DropdownList>
</FooterTemplate>
<EditItemTemplate>
<asp:dropdownList ID="ddlStores" DataSource='<%# BindStores() %>' selectedindex='<%# GetSelectedIndexStore(DataBinder.Eval(Container.Da taItem, "STORENAME").ToString())%>' runat="server" DataTextField="STORE" DataValueField="StoreID">
</asp:dropdownList>
</EditItemTemplate>
</asp:TemplateColumn>


<asp:TemplateColumn HeaderText="User Name">
<ItemTemplate>
<asp:Label Text='<%# Convert.ToString(DataBinder.Eval(Container.DataIte m,"USERNAME")) %>' Runat="server" ID="lblUserName">
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="insertUserName" Width="120" runat="server"></asp:TextBox>
</FooterTemplate>
<EditItemTemplate>
<asp:TextBox Runat="server" ID="editUserName" Text = '<%# Convert.ToString(DataBinder.Eval(Container.DataIte m,"USERNAME")) %>' Width="150">

I would like to have this not going along the columns

but instead each line. along each line

user:
password:
instead of having

user password

I tried to enter <BR> between </asp:TemplateColumn>

<asp:TemplateColumn>

I don't have any resources on me. And I not have much internet access time. If someone can help me. Then that would be great.
Even give me a link or what have you.

I get the error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Literal content ('</br>') is not allowed within a 'System.Web.UI.WebControls.DataGridColumnCollectio n'.

Source Error:

Knowledge is to be shared.
__________________
Knowledge is to be shared.
 
Old October 7th, 2004, 09:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Then you need to have one template column for all three, not three separate template columns. Remember, Template columns are columns for the table, and such, the <br> have no effect. Template columns are similar to <tr><td> for a <table> element. You can't stick in a <br> anywhere in there to break it up.

Brian
 
Old December 7th, 2005, 08:58 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
hopefully an easy question davehodges Access 1 November 7th, 2007 06:36 AM
Easy Question hexOffender Beginning PHP 2 July 12th, 2006 05:03 AM
Easy Question yikomaka Visual C++ 0 June 13th, 2005 08:50 PM
Easy Question - I think gmoney060 Classic ASP Basics 3 November 2nd, 2004 06:54 PM
easy question khautinh C# 4 August 6th, 2003 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.