Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old July 28th, 2008, 04:01 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
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
Reply With Quote
  #22 (permalink)  
Old July 28th, 2008, 05:32 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
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>


Reply With Quote
  #23 (permalink)  
Old July 28th, 2008, 06:51 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
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>
Reply With Quote
  #24 (permalink)  
Old July 28th, 2008, 07:59 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
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
Reply With Quote
  #25 (permalink)  
Old July 29th, 2008, 07:23 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
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.

Reply With Quote
  #26 (permalink)  
Old July 29th, 2008, 07:25 AM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.