Form

Filling Forms with Data

FillInFrom sets the values of all input controls from a data source - accepts a GPALDatabase, GPALFile, or IGPALGrid<string>. AppendFrom adds to the current control values rather than overwriting. InsertFrom places data at the beginning of each control's current value. CallAfterFillIn registers a delegate that fires after each row of data is applied to the form controls - use it to validate, submit, or log before the next row is loaded.

Examples

GPAL Fluent: High-level fluent C# API

//FillInFrom with a grid source iterates through each row, populating the form controls in order. CallAfterFillIn fires between rows, giving you a hook to save or validate the current entry before the next row is loaded.

// Populate a form from a grid and process each row

GPAL.Form

.WithTitle("Data Entry")

.WithFormControl((Input)GPAL.Input)

.WithFormControl((Input)GPAL.Input)

.FillInFrom(dataGrid)

.CallAfterFillIn((form, grid) => {

// Custom post-row logic here

return 0;

})

.ShowDialog();

💬 Ask GPAL