Auto-Suggested Textbox like google auto suggest



  • 1. datagrid created from a view
    Hello, I have a datagrid populated with rows from a view. Because they are from a view, the rows are not actual database records, and therefore lack unique identifiers. So I have a command button for each row. When the button is pressed, I want to go to another page with all the information in that selected row. Normally I would do this (if the rows are actual records, that is) //take the datakey value string selected_id = dgMyDataGrid.DataKeys[e.Item.ItemIndex] //and do this before tranfering to another page. Context.Items.Add("uniquekey", selected_id); Then on the second page, I would take the selected_id and retreive the record from the database (I've always wondered if that trip to the database server would be necessary). But I can't even do this with rows from a view because there is no unique identifier. But I still want to take the row from the view and give it to the destination page.
  • 2. datagrid: can't get read text from a cell programmatically
    In the event handler for ItemCommand, I am trying to read text of cells in the row programmatically, but can't get it working. //this is what I have in InitializeComponent this.dgList.ItemCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgList_Command); //this is the event handler. private void dgList_Command(object sender, DataGridCommandEventArgs e) { if(e.CommandName == "View") { Response.Write(e.Item.Cells.Count); Response.Write(e.Item.Cells[0].Text); } } When the button is command button is pressed, I am trying to read the text in the first cell (e.Item.Cells[0].text), but nothing is showing up. I do see that it recognizes eItem.Cells.Count and shows the number of cells as expected. But I do I read the contents of the cell in that row? PS: I don't have Visual Studio 03 installed. Could this be a bug?

Auto-Suggested Textbox like google auto suggest

Postby V2FyYW4 » Sat, 22 Apr 2006 07:17:02 GMT

I need to create a Auto suggests Textboox like in 
I have completed this using AJAX.NET for Framework 1.1 . I have some design 
issues after the data is populated. 

For me the problem is I am getting more space after the item is selected. 
And the items are displayed in a combo when i am going for another search / 
selection without refreshing the page. 
I am expecting a same output as google's auto suggested textbox.

see my work at  http://www.**--****.com/ 
Please let me know if you get any on this.

The below is the javascript which helps to display the text box and the combo

			//matches select
			var matcheList = document.getElementById("matches");

			//called by the onKeyUp javascript event on the input
			function FindMatches(searchCriteria)
				if (searchCriteria)
					//SearchComplection is defined by Ajax.Net because that's the name of 
the type we registered
					NewOrder.FindMatches(searchCriteria, FindMatches_CallBack);
					//clear the states dropdown = "hidden";
			//callback we told Ajax.Net to pass the response tos
			function FindMatches_CallBack(response)
			//if the server side code threw an exception
				if (response.error != null)
					alert(response.error); //we should probably do better than this
			//if we didn't get what we expect, or didn't get any matches  
				if (!response.value  || response.value.length == 0)
				{ = "hidden";
	 = "visible";
				matcheList.options.length = 0; //reset the states dropdown    
				matcheList.size = response.value.length; //dynamically set the size of 
the select box   
				for (var i = 0; i < response.value.length; ++i)
					matcheList.options[matcheList.options.length] = new 

			//called when a match item is selected from the list
			function MatchSelected(matches)
				var state = document.getElementById("state");
				var divDisp = document.getElementById("divList");
				state.value = matches.options[matches.selectedIndex].text; = "hidden";
				//document.frmOrder.txtPClaimNo.focus();"40px" = "hidden";

				selected = matcheList.options.selectedIndex;
				value = state.value

				if (selected !=0 || selected ==0)
					for (var i = 0, oldpos = -1; i<count-1; i++)
						pos = value.indexOf(',',oldpos+1);
						data = value.substring(oldpos+1,pos);
						frmOrder.elements['txtC' + i].value = value.substring(oldpos+1,pos);
						oldpos = pos;
					frmOrder.elements['txtC' + i].value = 

Similar Threads:

1.Limiting Auto suggest dropdown to make VS auto suggest properties during dev

After a year and a half of not touching ASP.NET, I have finally talked my 
company into letting me build a useable app in .NET instead of classic. Now 
I have to play catch up. i would really appreciate answers to the following 
(hopefully easy) questions.

I have the web created (well, in dev) and the pages process fine. How can I 
get VS (2003) to auto suggest properties for web controls. For example, I 
created a new page called junkpage.aspx (outside of VS, direct into folder 
where web pages exist). When I open the page in VS, and start typing 
something like :

<asp:label id="mylabel" "

At this point I would expect VS to pop up a list suggesting all of the 
properties of a label such as forecolor, text etc. On my pages however, 
there is nothing. Also, in the left pane where the "toolbar" is, there are 
no server controls. Just regular HTML which if you drag into the aspx page, 
simply put in HTML instead of the server control (for example, Select 
instead of DropDownList).

What am I missing here?

Rick complete, spell and suggest

I have to develop search text box feature in our web system. It should
support 3 features:
1. Auto-complete, means it should propose list of values during user
2. Spell checking, means propose most appropriated values even when
user typed mistake.
3. Suggest, means after search it should give "did you mean X" note,
like in google search

Of course all the 3 features should be based on data from our
The web system developed on top of Microsoft technologies like
ASP.NET, Silverlight and MSSQL.
Can you please suggest some 3rd party that can help me with this?

Maxim. suggest dictionary

I have a windows mobile 5.0 device, and an application written in .net cf 
2.0. Is there a way to use a custom dictionary for auto suggest feature in 
text boxes? I have looked everywhere but cannot find the dictionary...

Any and all help is greatly appreciated!


5.Auto Complete/Suggest (On Steroids)

6. LiveSearch/Google Suggest component

7. "Google Suggests" and the AJAX .NET Wrapper?

8. google suggest, how can I do this?

Return to ASP.NET


Who is online

Users browsing this forum: No registered users and 21 guest