Andrew,
>If I try to localise a form (using the LocalizeToolBar) with an empty mmDataGrid (grid showing zero posts and no column headers) then I get this exception when I close the form-localization form, does anyone know what I am doing to cause this?
>
>Exception message : Value cannot be null.
>Parameter name: dataSource
I was able to reproduce this problem (I didn't catch it previously because I never show DataGrids with nothing in them...I always call GetEmptyDataSet() on the business object so there are at least columns in the DataGrid).
ANYWAY, it should work in either case, so I changed mmDataGrid.OnBindData() to check if the grid's DataSource is null before trying to retrieve the currency manager:
if (this.DataSource != null)
{
CurrencyManager cm = this.GetCurrencyManager();
((DataView)cm.List).AllowNew = false;
}
If you need this change sooner than later, you can make it to your MM .NET source code and you'll be set when the next version is released (and I'll give you credit in the What's New Guide!).
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com