Click here to Skip to main content
15,924,193 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
nainakarri29-Oct-09 19:59
nainakarri29-Oct-09 19:59 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
dan!sh 29-Oct-09 20:09
professional dan!sh 29-Oct-09 20:09 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
Christian Graus29-Oct-09 20:53
protectorChristian Graus29-Oct-09 20:53 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
dan!sh 29-Oct-09 21:05
professional dan!sh 29-Oct-09 21:05 
AnswerRe: Gridview as tooltip for rows in asp.net gridview Pin
dan!sh 29-Oct-09 20:06
professional dan!sh 29-Oct-09 20:06 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
nainakarri29-Oct-09 20:25
nainakarri29-Oct-09 20:25 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
nainakarri29-Oct-09 21:23
nainakarri29-Oct-09 21:23 
GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
dan!sh 30-Oct-09 1:54
professional dan!sh 30-Oct-09 1:54 
Following should explain what I meant:

<pre><div>
                  <asp:GridView ID="gridView" runat="server">
                  </asp:GridView>

                  <script type="text/javascript">
                  function ShowToolTip(email){
                        document.getElementById("emailCell").innerText=email;
                        document.getElementById("tooltip").style.display="block";
                  }  
        
                  function HideToolTip(){
                        document.getElementById("tooltip").style.display="none";
                  }
                  </script>

                  <div id="tooltip" runat="Server" style="display: none;">
                        <table id="tooltiptable">
                              <tr>
                                    <td id="emailCell">
                                    </td>
                              </tr>
                        </table>
                  </div>
            </div></pre>

and in cs file:

<pre>            List<string> email = new List<string>();

            protected void Page_Load(object sender, EventArgs e)
            {
                  gridView.RowDataBound += new GridViewRowEventHandler(gridView_RowDataBound);
                 
                  email.Add("a@b.com");
                  email.Add("s@b.com");
                  email.Add("d@b.com");
                  email.Add("f@b.com");
                  email.Add("g@b.com");
                 
                  List<string> lst = new List<string>();
                  lst.Add("a");
                  lst.Add("s");
                  lst.Add("d");
                  lst.Add("f");
                  lst.Add("g");
                  gridView.DataSource = lst;
                  gridView.DataBind();
            }

            protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
            {
                  if (e.Row.RowType == DataControlRowType.DataRow)
                  {
                        e.Row.Attributes.Add("onmouseover", "return ShowToolTip('" + email[e.Row.RowIndex] + "');");
                        e.Row.Attributes.Add("onmouseout", "return HideToolTip();");
                  }
            }</pre>

It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

GeneralRe: Gridview as tooltip for rows in asp.net gridview Pin
nainakarri2-Nov-09 19:39
nainakarri2-Nov-09 19:39 
QuestionExecuteScalar requires the command to have a transaction Pin
Karan_TN29-Oct-09 18:41
Karan_TN29-Oct-09 18:41 
AnswerRe: ExecuteScalar requires the command to have a transaction Pin
Christian Graus29-Oct-09 18:43
protectorChristian Graus29-Oct-09 18:43 
GeneralRe: ExecuteScalar requires the command to have a transaction Pin
Karan_TN29-Oct-09 18:49
Karan_TN29-Oct-09 18:49 
QuestionConverting images to sql server table Pin
thisraja29-Oct-09 14:58
thisraja29-Oct-09 14:58 
AnswerRe: Converting images to sql server table Pin
Christian Graus29-Oct-09 15:00
protectorChristian Graus29-Oct-09 15:00 
GeneralRe: Converting images to sql server table Pin
Kannan Ar29-Oct-09 15:50
professionalKannan Ar29-Oct-09 15:50 
GeneralRe: Converting images to sql server table Pin
Christian Graus29-Oct-09 15:51
protectorChristian Graus29-Oct-09 15:51 
QuestionHi, i have big problem with TextBox [modified] Pin
mmda29-Oct-09 14:25
mmda29-Oct-09 14:25 
AnswerRe: Hi, i have big problem with TextBox Pin
Christian Graus29-Oct-09 14:28
protectorChristian Graus29-Oct-09 14:28 
AnswerRe: Hi, i have big problem with TextBox Pin
Christian Graus29-Oct-09 14:59
protectorChristian Graus29-Oct-09 14:59 
AnswerRe: Hi, i have big problem with TextBox Pin
Christian Graus29-Oct-09 15:30
protectorChristian Graus29-Oct-09 15:30 
QuestionHow to access a ListBox within a custom control with Javascript in the aspx page. Pin
Rico MNC29-Oct-09 12:10
professionalRico MNC29-Oct-09 12:10 
QuestionWeb Site Hosting Process Pin
Shahdat Hosain29-Oct-09 7:12
Shahdat Hosain29-Oct-09 7:12 
AnswerRe: Web Site Hosting Process Pin
Abhishek Sur29-Oct-09 7:19
professionalAbhishek Sur29-Oct-09 7:19 
GeneralRe: Web Site Hosting Process Pin
Shahdat Hosain29-Oct-09 8:17
Shahdat Hosain29-Oct-09 8:17 
GeneralRe: Web Site Hosting Process Pin
Abhishek Sur29-Oct-09 10:36
professionalAbhishek Sur29-Oct-09 10:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.