northcr
2015-06-19T15:53:24Z
Hi, I have an iGrid bound to a recordset in Access 2013. when the user changes some options on the form, the VBA rebuilds the table based on the new parameters. However the iGrid doesn't consistently refresh the grid correctly. The field names in the table change, as does the data, but on the grid the field names remain static and the data changes. This is contrary to what I need and to the structure of the underlying table. Both data and field names need to update on the grid.
I have tried the "with iGrid.Clear" code.

Any thoughts?

Many thanks.
Igor/10Tec
2015-06-20T06:02:33Z
I imply we are talking about the FillFromRS method you used to 'bind' iGrid to a recordset. When you call FillFromRS, the data are just COPIED from the specified source to the grid, and there is no live connection to the recordset so any changes in the recordset are reflected immediately in the grid.

What you are asking is real data-binding, but iGrid never had it. We position our iGrid as an advanced editable replacement for the standard ListView and FlexGrid controls, and our grid control does not implement data binding like those controls too.

In the general case, if you need to refresh the data in the grid, you repopulate the control using the same method. I do not know what kinds of data changes can happen in your particular task, but for some specific cases you can develop your own update strategy to avoid full repopulation of the control. However, if the field set changes, it's an enough complex task and you need to repopulate the whole grid.