When I try to update the ImageUrl column I find that it is readonly and I cannot modify it's content.
Public Overrides Function Fill(ByVal maxNumberOfItemsToReturn As Long, ByVal sortClauses As ISortExpression, ByVal allowDuplicates As Boolean, ByVal selectFilter As IPredicate, ByVal transactionToUse As ITransaction, ByVal groupByClause As IGroupByCollection, ByVal pageNumber As Integer, ByVal pageSize As Integer) As Boolean
Dim llok As Boolean = False
llok = MyBase.Fill(maxNumberOfItemsToReturn, sortClauses, allowDuplicates, selectFilter, transactionToUse, groupByClause, pageNumber, pageSize)
Me.FillImages()
Return llok
End Function
Private Sub FillImages()
Dim i As Integer = 0
For i = 0 To Me.Count - 1
Me(i).Imageurl = oAws.FindImage(Me(i).Sku1)
Next
End Sub
System.Data.ReadOnlyException was unhandled by user code
Message="Column 'Imageurl' is read only."
Source="System.Data"
StackTrace:
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at AWS2_DAL.TypedListClasses.InvListRow.set_Imageurl(String Value) in M:\Projects\AWS2\TypedListClasses\InvListTypedList.vb:line 1751
at AWS2_DAL.TypedListClasses.InvList.FillImages() in M:\Projects\AWS2\InvList.vb:line 313
at AWS2_DAL.TypedListClasses.InvList.Fill(Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, Boolean allowDuplicates, IPredicate selectFilter, ITransaction transactionToUse, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize) in M:\Projects\AWS2\InvList.vb:line 306
at SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSourceView.ExecuteSelectTypedList(Int32 pageSize, Int32 pageNumber, DataSourceSelectArguments arguments)
at SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.GridView.DataBind()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
bclubb wrote:
No, the OnResultsetBuilt is called after the fields list is created so there is no data in the typedlist. I believe that Frans was suggesting that you create you method to accept the typedlist and isbn and then process the passed typedlist with your logic to replace the image column.