I have a control RadMultiColumn Control on my form as you can see here its showing Telerik.WinControls.UI.GridViewDataRowInfo in the text box however when selecting the option it then throws a null statement.
dpStockSelection.DataSource = _sageManager.ProductFetchAll();
public
List<Product> ProductFetchAll()
{
if
(!IsConnected)
throw
new
Exception(
"Not connected to Sage"
);
List<Product> products =
new
List<Product>();
SageDataObject230.IStockRecord sageStockRecord = (SageDataObject230.IStockRecord)_workSpace.CreateObject(
"StockRecord"
);
try
{
if
(sageStockRecord.MoveFirst())
{
do
{
products.Add(CreateProduct(sageStockRecord));
}
while
(sageStockRecord.MoveNext());
}
}
finally
{
sageStockRecord =
null
;
}
return
products;
}