2022.1.9, Classic WinForms screens, multi-company, multi-plant.
I’m building an updatable dashboard for the PartAlloc table, and I need to assign an entered value to a field in multiple rows depending on the user selection. I’d like to make a customization with a field tied to a BPM data field (if that can be accessed from the C# code) and install an “Assign” button. When the user clicks the button, the value in the box gets assigned to a field of all selected records in the grid.
My second choice would be to label one of the unused Y/N columns “select start” and another one “select end” and when the user clicks the button, assign the value to the field of all records between these two inclusive. But it would be more intuitive for a Windows user who already knows how to select multiple rows of a grid, to be able to act on the selection.
Can someone advise me on the code to put in the click handler?
Thanks
..Monty.
Ps. Since my original posting I’ve come across someone attempting to do something similar, which was build a tilde-delimited list and pass it to a BO method. I’ll post that code here.
private void btnBuildProjAnls_MouseClick(object sender,
System.Windows.Forms.MouseEventArgs args)
{
LaunchFormOptions opts = new LaunchFormOptions();
try
{
var dataRows = RRHeader.Selected.Rows;//RRHeader is the grid in question
string projectIDString = "";
foreach(Infragistics.Win.UltraWinGrid.UltraGridRow gridRow in dataRows)
{
projectIDString = projectIDString + "~" +
gridRow.Cells["ProjectCst_ProjectID"].Value.ToString();
} // end for each
opts.ValueIn = projectIDString.Substring(1); //Have to trim off the leading ~
ProcessCaller.LaunchForm(oTrans,"Erp.UIProc.GenerateAnalysis.dll",
opts);
} // end try
catch{}
} // end event handler