Get a GUID for a grid view in 10.1.600.4

so put myGrid in pop up message or something (sorry I’m so dense, I don’t really know what you mean when you say ‘get ahold of’)

Is that supposed to be one line of code? Is there an extra ; in there?

private EpiUltraGrid GetGridFromControl(Control control)
{
	EpiUltraGrid eug = null;

	foreach (Control child in control.Controls)
	{
		if (child is EpiUltraGrid)
		{
			eug = (EpiUltraGrid)child;
		}
		else
		{
			eug = GetGridFromControl(child);
		}

		if (eug != null)
		{
			return eug;
		}
	}
	return null;
}

Yup, extra ; there mybad. Yes it is one line of code.

var myGrid = ((Ice.Lib.Framework.UIApp.EpiGridPanel)csm.GetNativeControlReference("0dc366dd-bfe0-481c-a125-d353e0f93eaa")).EpiGrid;

@josecgomez @T11

Thanks for the help. I’m not good enough with C# to insert this code without an in context example.

My workaround of adding the grid in the customization is working however, so I will continue with that for now, so you don’t have to waste your time explaining the basics to me.

Someday I’m sure I’ll look back and this and see how easy it probably is, but today is not that day…

1 Like