EpiGrid Collection 10.1 to 10.2

Hello,

I have a form customization on Quantity Adjustment that has been uplifted from 10.1.400.38 to 10.2.300.3 that I am trying to validate.

We have custom code on this form that modifies the collection, grdInventoryQtyAdjBrw on the EpiUltraGrid named: inventoryQtyAdjBrwView. The added column is populated by some calculations that are applied in the form customization.

In the uplifted version, the custom column does appear in the collection as expected, but when the scenario is correct on the form for this column to have data, there is none. The underlying data is a decimal and not even a 0.0 shows up on the grid. it is just blank.

When I drill into the ‘collection’ on the grid properties, I do see may custom column, so I know at least the form has a place holder for the data.

The form does compile the code form 10.1 to 10.2.
Looking for some hints on how to trouble shoot this.

I have compared the base collection from 10.1 to 10.2 and see there are not any changes in the columns.
Maybe there is something wrong with the routine that sends the data back to the grid.
I can supply some more detail if needed.

Thanks,
JM

We may need to see the code. It typically depends on WHEN the field is created and WHEN it is populated.

Thanks Jason,

The advice on focusing on the ‘When’ may have started me on the right track.

So I think the routines that update the custom column in the grid are called from the code below.

I took the comments out to use the MessageBox that shows the adapter names.
When I run in 10.1 I see the adapter name in the message box for “CheckSN”
But when I run in 10.2 i do not get that particular message box.
There seem to be 5 args in 10.1 and only 4 args in 10.2.
The one call out to UpdateWharehouseBins(); is keyed upon that CheckSN arg.
So i can maybe now see why this is not populated correctly.

We use Lot Trace (Serial) to track some dimensional inventory, which I am guessing that the CheckSN arg is tied to.
Any advice on how to check similar so that I can get the corresponding routines to run and update the column in the UI?

indent private void oTrans_adapter_AfterAdapterMethod(object sender, AfterAdapterMethodArgs args)
{
	// ** Argument Properties and Uses **
	// ** args.MethodName **
	// ** Add Event Handler Code **

	// ** Use MessageBox to find adapter method name
	EpiMessageBox.Show(args.MethodName);

	switch (args.MethodName)
	{
		case "Update":
			break;

		case "SetInventoryQtyAdj":
			grpHideData.Visible = true;
			break;

		case "CheckSN":
			if (IsCurrentPartDimensional)
			{
				UpdateWarehouseBins();
			}
			break;
	}

}text by 4 spaces

Additionally

I put a test button on the form and set the click event to run UpdateWarehouseBins(); and the column in the grid is updated when clicked. So I at least know the logic to do the math on the fly for this column is working.

Just need to find a a different hook to kick this off.

In 10.1 when I loop through the arg messageboxes, the grid gets populated before CheckSN (the last arg) is hit. I think this allows the data to hit the grid and then have the custom column updated accordingly.

In 10.2 when looping through the arg messageboxes the grid does not get populated until after all the arguments have processed. Even though I have tried to test on a couple other args, i think it they are all too early for the grid to be updated properly.

Any ideas are much appreciated.

Thanks,
JM

I’m now attempting to move the logic that updates to column in the EpiUltraGrid to the
ListChanged Event on inventoryQtyAdjBrwView.
This works to some degree, but I would like to know how to check the dataview for 0 records before doing the processing.

I am getting a couple errors when testing the UI under different circumstances:

Error Detail

Message: There is no row at position 0.

hoping this is a simple check and need help on the syntax and where to position.

indent 	private void inventoryQtyAdjBrwView_DataView_ListChanged(object sender, ListChangedEventArgs args)
{
	// ** Argument Properties and Uses **
	// inventoryQtyAdjBrwView_DataView[0]["FieldName"]
	// args.ListChangedType, args.NewIndex, args.OldIndex
	// ListChangedType.ItemAdded, ListChangedType.ItemChanged, ListChangedType.ItemDeleted, ListChangedType.ItemMoved, ListChangedType.Reset
	// Add Event Handler Code
	//EpiMessageBox.Show("inventoryQtyAdjBrwView_DataView_ListChanged");


		if (IsCurrentPartDimensional)
			{
				UpdateWarehouseBins();
			}
	
} text by 4 spaces

Hi Joe,
You should be able to do this

if (inventoryQtyAdjBrwView_DataView.dataView.Count > 0 && IsCurrentPartDimensional)

Thanks Chris…

I think this is working the way we want it to now, Little more testing to be sure, but I’m much closer now.

I did have to change:
inventoryQtyAdjBrwView_DataView.dataView.Count
to just:
inventoryQtyAdjBrwView_DataView.Count

Appreciate this type of help for a non-programmer.

-JM

1 Like