Multiple Results on a Simple Search

I have a button which launches a Search on UD100. The search will only allow me to select one record at a time. I want to be able to select like 5 or more rows at a time. How can I modify this code to achieve that.

private void SearchOnUD100AdapterShowDialog()
	{
		// Wizard Generated Search Method
		// You will need to call this method from another method in custom code
		// For example, [Form]_Load or [Button]_Click

		bool recSelected;
		string whereClause = string.Empty;
		System.Data.DataSet dsUD100Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD100Adapter", out recSelected, true, whereClause);
		if (recSelected)
		{
			System.Data.DataRow adapterRow = dsUD100Adapter.Tables[0].Rows[0];

			// Map Search Fields to Application Fields
			EpiDataView edvMyCustomUD100View = ((EpiDataView)(this.oTrans.EpiDataViews["MyCustomUD100View"]));
			System.Data.DataRow edvMyCustomUD100ViewRow = edvMyCustomUD100View.CurrentDataRow;
			if ((edvMyCustomUD100ViewRow != null))
			{
				edvMyCustomUD100ViewRow.BeginEdit();
				edvMyCustomUD100ViewRow["Key1"] = adapterRow["Key1"];
				edvMyCustomUD100ViewRow["Key2"] = adapterRow["Key2"];
				edvMyCustomUD100ViewRow["Key3"] = adapterRow["Key3"];
				edvMyCustomUD100ViewRow["Key4"] = adapterRow["Key4"];
				edvMyCustomUD100ViewRow["Key5"] = adapterRow["Key5"];
				edvMyCustomUD100ViewRow.EndEdit();
			}
		}
	}

Instead of all your code. Try this if you are in UD100 Form.

    SearchOptions searchOption = new SearchOptions(SearchMode.ShowDialog) { DataSetMode = DataSetMode.RowsDataSet };
    try
    {
        this.oTrans.InvokeSearch(searchOption);
    }
    catch
    {

    }
1 Like

That does return all rows but I can’t replace all of the code as I need it to search a particular adapter of UD100 and I need to tell it to return the search result data to a particular field. Are there aspects of this I can integrate into my original code?