EpiCombo usage

I am trying to wrap my head around some of the features of the EpiCombo.

With standard VCL Combos, I am used to having a SelectedIndex which tells what item in the list is selected.

On the EpiCombo, I see SelectedRow. Is this the same premise except its a DataRow? If so, to effectively set the SelectedIndex I would pick a row and set Selected = true? Do I have to iterate all rows and DESELECT first to avoid multiple selections?

What’s the difference between Activated and Selected?

And for the cherry on top, why does the following code ONLY run if touch/select an item on the EpiCombo?

foreach(var lrow in labelCombo.Rows)
				{
					//MessageBox.Show(lrow.Cells["CodeDesc"].Text); 
					if(lrow.Cells["CodeDesc"].Text == row.Cells["Part_UserChar3"].Text)
					{
						//do something
						labelCombo.Value = lrow.Cells["CodeDesc"].Text;
						//MessageBox.Show("Got: "+lrow.Cells["CodeDesc"].Text);
						break;
					}				
				}

What’s your end goal? Looks like you bound the combo to some user code stuff? There may be a better / easier way to skin this cat

Mwaha maybe someone beat us to that cat already.

I am using UserCodes to list potential label types (which drives my label format for bartender). Each Part record has a label type selected from those user codes.

On this particular screen, I list open jobs. When a job is selected, the details are populated for the user to see: Part#, Qty, LabelType

I have an EpiCombo bound to my UDCodes for label types so it lists all available label types, but when a user clicks a job, I want the LabelType from the part record to set the selected value. I feel like I just did an awful job explaining that.

My work in progress form (using your dashboard form trick):

What?.. Wanna give that a shot again? You might be able to use the Combo Filters Append option… I think

Simplified version: I have an EpiCombo populated with my list. I want to select a specific item on the list.

My current settings:

Is your labeltype dropdown bound to an epidataview?

No because I wanted the user to be allowed to change it if desired. Can that still happen with an EpiView bind?

yeah you can make your own magical EpiDataView that would allow you tojust set the EpiDataView field value but they can still change it.

DataTable myTable = new DataTable();
myTable.Columns.Add(new DataColumn("LabelType",typeof(string));
myTable.Columns.Add(new DataColumn("SysRowID",typeof(Guid)){DefaultValue=Guid.NewGuid()};
DataRow dr =myTable.NewRow();
myTable.Rows.Add(dr);

EpiDataView edvMyAwesomeDV = new EpiDataView();
edvMyAwesomeDV.dataView = myTable.DefaultView();
oTrans.Add("MyBindingDV",edvMyAwesomeDV);

Run that in InitialiZe Custom Code, close out and back in and you should now see MyBindingDV as a DataView to bind your control to.

Then when your selection changes just set edvMyAwesomeDV.dataView[edvMyAwesomeDV.Row][“LabelType”] = your default type

Not bad typing it out by hand. I had to make a few minor fixes to some punctuation but it works like a champ. It runs like a scalded dog so to speak

What’s the difference between a selection and activation in a dataRow?

Also, is the SysRowID mandatory? What purpose does it serve?

If you create an EpiDataView without a SysRowID it gets pissy