Link to home
Start Free TrialLog in
Avatar of Rad1
Rad1

asked on

Gridview with added Templates and TextBox does not display text

Hi,

I have a Gridview with added Templates, I have TextBoxs in the Templates.
(See code below)

The problem:
One of the textboxes display data in it as supposed to, but the second textbox only displays a one line in it.

What make it do that????

Thank you!!!

 <asp:TemplateField HeaderText="Comments" SortExpression="Comments">
                         <HeaderStyle ForeColor="White" Font-Names="Times New Roman" Font-Size="Small" />
                         <EditItemTemplate>
                             <asp:TextBox ID="txtcomments" runat="server" CssClass="LongUrlLabel " 
                                 Height="100px" ontextchanged="txtDescription_TextChanged" 
                                 Text='<%# Bind("Comments") %>' TextMode="MultiLine" Width="300px"></asp:TextBox>
                         </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label6" runat="server" Text='<%# Bind("Comments") %>' 
                                Width="150px" Height="16px" CssClass="LongUrlLabel"></asp:Label>
                        </ItemTemplate>
                         <ControlStyle Width="250px" />
                    </asp:TemplateField>

Open in new window

SOLUTION
Avatar of Alan Warren
Alan Warren
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rad1
Rad1

ASKER

Thank you!!!

Both textboxes are textboxes
Both are in different itemtemplate
Both are multiline
Avatar of Rad1

ASKER

Its strange!!!

I have two pages with the same Gridview.  On the first one it works just fine (display data or text fully), but on the other page the Gridview textboxes do not work (only display a one line).
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rad1

ASKER

Alan,

I found out that I was using
.LongUrlLabel  {  overflow:hidden;   } which was causing the rest of the text to display.
But, the second column was display the whole text correctly?????
Avatar of Rad1

ASKER

Thank you Alan!!!