Iterate through dashboard grid/dataview

What is the best way to iterate through a dashboard assembly grid or dataview in an E9 dashboard?

I can access grids through the common method of creating a object from the GUID in E10 (like below) but this is giving me an 'object instance…" error in E9.

Ultimately, I am trying to query a dataset, return it to the grid and then loop through that dataset to perform other operations.

Thank you!
Ross

// **************************************************
// Custom code for MainController
// Created: 4/23/2019 9:55:49 PM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **

// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **
EpiUltraGrid ugrdPDPAttachments;

public void InitializeCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization

	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls
	ugrdPDPAttachments = (EpiUltraGrid)csm.GetNativeControlReference("267c0139-0f07-4cb3-8567-1612e4b3c824");
	this.ugrdPDPAttachments.DoubleClickRow += new Infragistics.Win.UltraWinGrid.DoubleClickRowEventHandler(this.ugrdPDPAttachments_DoubleClickRow);
	
	// End Wizard Added Custom Method Calls
	
}

public void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal
	this.ugrdPDPAttachments.DoubleClickRow -= new Infragistics.Win.UltraWinGrid.DoubleClickRowEventHandler(this.ugrdPDPAttachments_DoubleClickRow);
	
	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal
}

I’m not an E9 guy. but i wonder if something like this would work (i assume your EpiBinding would dictate what epidataview name you need)

var edvCallContextBpmData = (EpiDataView)(oTrans.EpiDataViews["CallContextBpmData"]);
foreach(var row in edvCallContextBpmData.dataView)
{
   //use row here which is a type of DataRowView
}
2 Likes

Thanks, Chris. I wasn’t thinking very clearly. Your tip got me straightened out and I appreciate it!

Ross

No worries, gad to help!