Hey guys, i am trying to write a piece of C# in the Receipt Entry, Mass receipts program. Right now I am trying to to just use the part number which shows up in the our part text field and provide the user a button. when they click the button i want to select all receipt lines that have the same part number.
Right now it will move 1 row down but then gives me this error : Cannot access a disposed object. Object name 'infragistics.WIn.UltraWinGrid.UltraGridCell."
I have used similar customizations on dashboards before, but the data was always still there even if it was hidden. I think my problem here is that it no longer exists in the PO releases grid after it has moved to the mass receipts grid. Any thoughts or help would be appreciated.
//public void SelectParts(object sender, System.EventArgs args)
//{
//MessageBox.Show("1");
Epicor.Mfg.UI.FrameWork.EpiTextBox partnumtxt = (Epicor.Mfg.UI.FrameWork.EpiTextBox) csm.GetNativeControlReference("03a6afb6-0cc9-4db1-9429-738c9464a0ea");
String partnum = partnumtxt.Value.ToString();
//MessageBox.Show("2");
EpiUltraGrid grid = (Epicor.Mfg.UI.FrameWork.EpiUltraGrid) csm.GetNativeControlReference("bdd4c235-c3ed-4ace-8a8f-fc9eebaa58c6");
DialogResult dialogResult = MessageBox.Show("Confirm you want to Receive all: " + partnum, "Receipt Confirmation", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{ //MessageBox.Show("3");
for( int i = grid.Rows.Count-1; i >= 0; i--)
{
if(grid.Rows[i].Cells["PartNum"].Text.ToString() == partnum)
{
MessageBox.Show(i.ToString());
grid.Rows[i].Cells["Selected"].Value = true;
}
}
Thanks,
Bobby