Hi,
In C# I can create DataTable, load it with data and use it as data source for DataGridView on a form.
Is it possible to do something similar in Mongoose form?
Regards,
Kirill
You can use a Script to "read through" the DataTable and load the grid as well.
Add records to the Grid:
int i = 0;
foreach .....
ThisForm.Components["grid_MyGrid"].InsertGridRows( i+1, 1 ); ThisForm.Components["grid_MyGrid"].SetGridValue(i+1, 1, valField1); ThisForm.Components["grid_MyGrid"].SetGridValue(i+1, 2, valField2);
i++;
}
You can, yes. This would be a Custom Load Method written in an IDO Custom Assembly. Your column names need to match the names of the IDO Properties,
Ooh I like that.
Thanks Rene!
It works. I was able to create new rows in the grid and set values.
However there is something odd with the grid.
I can't see values in the grid. If I copy entire grid and past to Excel, I can see values copied from the grid.
Also, when I enter values manually to the grid cells, they disappear.
Do you have any ideas why grid behaves this way?
Thanks,
please ignore.
Closing the form and reopening resolved the issue.