Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control Refresh() Method
Message
From
08/07/2004 01:35:28
 
 
To
08/07/2004 01:30:57
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00921607
Message ID:
00921838
Views:
17
>>Bonnie,
>>
>>Are you able to answer another quick question?
>
>OK ... shoot

Here is a method in my non-realworld form I'm playing with. Same listbox bound to the same DataSet as before. The goal being that I want to move the listbox to reflect the find. This method shouldn't know or care about what listbox is bound to it, but I can't figure out how to actually get the Find() method to move to the row in question.
private void FindCity(string cityName)
// todo:  add second parameter (bool) to determine whether or not to move pointer
//      and change return type to bool
{
	DataRow oRow;
			
	oRow = (DataRow) dsCities.Tables["Cities"].Rows.Find(cityName);
			
	if (oRow == null)
		MessageBox.Show(cityName + " not found");
	else
	{
		// don't want to resort to this to move the selection in the listbox...		
		lbCities.SelectedValue = oRow["Name"];
			
	}

}
Any ideas? Thanks :)


Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform