Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 September 8th, 2011, 01:08 PM
Authorized User
 
Join Date: Apr 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default ItemTemplate

Hi,
When I open my form I have the form in “ReadOnly” status and with the width = X.
I change the width in Edit/InsertItemTemplate = Y, but I don’t know how can I change the width for the read only status.
I try with ItemTemplate, but nothing.
Thanks.
 
Old September 8th, 2011, 02:13 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Not sure I understand the question. Which chapter and page number is this referring to?
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2011, 02:19 PM
Authorized User
 
Join Date: Apr 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

"Updating and Inserting Data" page 465
Code:
<EditItemTemplate>
     <asp:TextBox ID=”TextBox2” TextMode=”MultiLine” Width=”500” Height=”100”
runat=”server” Text=’<%# Bind(“Summary”) %>’></asp:TextBox>
</EditItemTemplate>
I want Width="500" when my field is ReadOnly
 
Old September 8th, 2011, 02:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And how is the template defined? What width are you trying to set on what? On a single piece of text or on a container maybe? Can you post a bit more code and provide some more details to make it easier for me to understand what you're trying to accomplish?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2011, 02:35 PM
Authorized User
 
Join Date: Apr 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
            <asp:TemplateField HeaderText="Issue Description" SortExpression="DsIssue">
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DsIssue") %>' TextMode="MultiLine" Width="900"></asp:TextBox>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DsIssue") %>' TextMode="MultiLine" Width="900"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqVal3" ControlToValidate="TextBox1" runat="server" ErrorMessage="Enter the issue description">
                    </asp:RequiredFieldValidator>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DsIssue") %>' TextMode="MultiLine" Width="900"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqVal4" ControlToValidate="TextBox1" runat="server" ErrorMessage="Enter the issue description">
                    </asp:RequiredFieldValidator>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("DsIssue") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
 
Old September 8th, 2011, 02:37 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Do you want to play "find the issue" for the rest of the day? Or would you rather provide some *useful description of your problem* so I can help you out and you can move on?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2011, 04:46 PM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Question

Can you elaborate problem in more details?
We cannot understand your question exactly.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove ItemTemplate Item - Not EditItemTemplate rsearing ASP.NET 2.0 Basics 0 July 24th, 2007 08:41 PM
GridView Checkbox ItemTemplate angelicagm ASP.NET 2.0 Professional 3 May 31st, 2007 04:44 AM
dropdownlist inside a datalist's itemtemplate stu9820 ASP.NET 1.0 and 1.1 Basics 2 April 26th, 2007 05:53 PM
How to Use ItemTemplate Editor wirerider ASP.NET 2.0 Basics 0 February 18th, 2006 02:59 PM





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