I
iScout
I am trying to write a custom control in VS2005 with C#. The control
displays a list of fields bound to a custom object. The display works great,
but I can't figure out the IDictionary values that need to be passed to the
DataSourceView.Update method. My code looks like this:
protected override void PerformUpdate(IShippingAddress dataItem)
{
dataItem.Address.Copy(this.AddressField.Address);
dataItem.ShipToMethod = (ShipToMethods) ShipToMethodField.Value;
DataSourceView view = GetData();
// HACK: This is a kludge because we can't find anyone
// that knows how to use these IDictionary parameters
view.Update(new Hashtable() ,
new Hashtable() ,
new Hashtable() ,
new DataSourceViewOperationCallback(delegate(int count ,
Exception exception)
{
return true;
}));
//Throw an event to inform anyone who cares
OnAddressChanged(new AddressChangedEventArgs(dataItem));
}
displays a list of fields bound to a custom object. The display works great,
but I can't figure out the IDictionary values that need to be passed to the
DataSourceView.Update method. My code looks like this:
protected override void PerformUpdate(IShippingAddress dataItem)
{
dataItem.Address.Copy(this.AddressField.Address);
dataItem.ShipToMethod = (ShipToMethods) ShipToMethodField.Value;
DataSourceView view = GetData();
// HACK: This is a kludge because we can't find anyone
// that knows how to use these IDictionary parameters
view.Update(new Hashtable() ,
new Hashtable() ,
new Hashtable() ,
new DataSourceViewOperationCallback(delegate(int count ,
Exception exception)
{
return true;
}));
//Throw an event to inform anyone who cares
OnAddressChanged(new AddressChangedEventArgs(dataItem));
}