Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Autocomplete with On mouseover details

Autocomplete with On mouseover details

Scheduled Pinned Locked Moved ATL / WTL / STL
csharpjavajavascripttools
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krishnamenon
    wrote on last edited by
    #1

    Hi AJAX xperts, I have AJAX autocomplete Textbox, which is a user control. i am getting employee details into this text box. upon typing 3 chars it will fetch 20 records which matchs with the prefix text. I modified _highligted function(item) in Autocomplete.js in order to store emp fullname in window.status . upon mouse over on this list i need populate employee details like dept, empid, empmanager, empcost center here is my autocomplese.asmx C# code : public string[] GetCompletionList(string prefixText, int count) { if (count == 0) { count = 10; } string peopledata = ConnectionStrings.GetConnectionString("Peopledata"); using (SqlConnection ConnStr = new SqlConnection(peopledata)) { ConnStr.Open(); SqlCommand sqlcmd = new SqlCommand("GetPeopleDetails", ConnStr); sqlcmd.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%"; sqlcmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(sqlcmd); DataTable dt = new DataTable(); da.Fill(dt); DataSet ds = new DataSet(); da.Fill(ds); string[] items = new string[dt.Rows.Count]; int i = 0; List PeopleData = new List(); foreach (DataRow dr in dt.Rows) { items.SetValue(dr["EmpFullName_MngrName"].ToString(), i); PeopleData.Add(dr["NBKid"].ToString()); PeopleData.Add(dr["PersonNo"].ToString()); PeopleData.Add(dr["CostCenter"].ToString()); PeopleData.Add(dr["Hierarchy"].ToString()); i++; } //return PeopleData.ToArray(); return items; }//end of sqlconnection } //end of GetCompletionList here is my java script code: var obj; function GetDataViaAJAX() { try { obj = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { obj = new Active

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups