Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 July 28th, 2008, 04:01 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

Show me the code you have now for the gridview... maybe something got "lost in translation"

Jason Hall
 
Old July 28th, 2008, 05:32 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Jason, latest markup for GridView

Code:
<asp:GridView ID="GridView2" runat="server" Style="z-index: 10px; position: relative; top: 43px; border-right: gray thin solid; border-top: gray thin solid; border-left: gray thin solid; border-bottom: gray thin solid; font-size: 12px; left: 10px;" Width="518px" AllowPaging="True" AllowSorting="True" Font-Size="Small" AutoGenerateColumns="False" CellSpacing="2" 
            HorizontalAlign="Left" BorderColor="LightGray" BorderStyle="None" PageSize="14" OnSorting="GridView2_Sorting" EmptyDataText="N/A">
               <Columns>
                   <asp:BoundField DataField="job_date" DataFormatString="{0:d}" HeaderText="Date" SortExpression="job_date" HtmlEncode="False">
                       <ItemStyle HorizontalAlign="Center" Width="40px" />
                   </asp:BoundField>
                   <asp:BoundField DataField="item_number" HeaderText="Cost Code" HtmlEncode="False">
                       <ItemStyle HorizontalAlign="Left" Width="60px" />
                   </asp:BoundField>
                   <asp:BoundField DataField="item_status" HeaderText="Active (Y/N)" SortExpression="item_status" >
                       <ItemStyle HorizontalAlign="Center" Width="25px" />
                   </asp:BoundField>
                   <asp:BoundField DataField="item_qty" HeaderText="Quantity">
                       <ItemStyle HorizontalAlign="Right" Width="55px" />
                   </asp:BoundField>
                   <asp:BoundField DataField="item_uom" HeaderText="UOM">
                       <ItemStyle HorizontalAlign="Center" Width="15px" />
                   </asp:BoundField>
                   <asp:TemplateField HeaderText="Notes">
                       <EditItemTemplate>
                           <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("item_notes") %>'></asp:TextBox>
                       </EditItemTemplate>
                       <ItemTemplate>
                           <asp:Label ID="Label2" runat="server" Text='<%# Bind("item_notes") %>'>ToolTip='<%# Eval("item_notes1") %>'</asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>
                   <asp:TemplateField HeaderText="Notes1" Visible="False">
                       <EditItemTemplate>
                           <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("item_notes1") %>'></asp:TextBox>
                       </EditItemTemplate>
                       <ItemTemplate>
                           <asp:Label ID="Label1" runat="server" Text='<%# Bind("item_notes1") %>'></asp:Label>
                       </ItemTemplate>
                   </asp:TemplateField>
            </Columns>
                <HeaderStyle BackColor="#FFC080" Height="35px" />
                <AlternatingRowStyle BackColor="#FFFFC0" /> 
                <RowStyle Height="20px" />
                <SelectedRowStyle BackColor="#FF8080" />

            </asp:GridView>


 
Old July 28th, 2008, 06:51 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Jason,

I even tried this:

Code:
ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="Select"
Text='<%# Bind("item_notes") %>'>ToolTip='<%#Eval("item_notes1", "ToolTip")%>'</asp:LinkButton>
</ItemTemplate>
and this:

Code:
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="Select"
Text='<%# Bind("item_notes") %>'>ToolTip='<%#DataBinder.Eval("item_notes1","Tooltip")%>'</asp:LinkButton>
</ItemTemplate>
 
Old July 28th, 2008, 07:59 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

your issue is you are putting your tooltip outside the tag as if it were the value of the label;
<asp:Label ID="Label2" runat="server" Text='<%# Bind("item_notes") %>'>ToolTip='<%# Eval("item_notes1") %>'</asp:Label>

it needs to be in the tag:
<asp:Label ID="Label2" runat="server" Text='<%# Bind("item_notes") %>' ToolTip='<%# Bind("item_notes1") %>'></asp:Label>


Jason Hall
 
Old July 29th, 2008, 07:23 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Jason,
I did the change that you described and the verdict is:

IT WORKS !!!!!!

Good catch, you saved my day. Thank you very much for ALL your help.

 
Old July 29th, 2008, 07:25 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

No problem glad it's working... sorry for all the "Brain Farts" yesterday I was working from home so
my thought process was a little slower haha

Jason Hall





Similar Threads
Thread Thread Starter Forum Replies Last Post
[Resolved] GridView to Excel snufse ASP.NET 2.0 Basics 2 October 28th, 2008 02:37 PM
[Resolved] GridView Sorting and Paging snufse ASP.NET 2.0 Basics 1 October 9th, 2008 07:45 AM
Can not Edit gridview having TemplateField coolcoder2007 .NET Framework 2.0 4 March 6th, 2008 06:36 AM
[Resolved] IListSource problem in GridView snufse ASP.NET 2.0 Basics 5 February 12th, 2008 01:42 PM
Enable Editing on Gridview - RESOLVED Andrew.Berry ASP.NET 2.0 Basics 0 October 3rd, 2007 05:29 AM





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