Hi,
We are binding a UltraWinGrid with a UltraWindataSource. Sometime when we we frequently load lot of data into the grid using the UltraWindataSource datasource. we are getting the Out of Memory excpetion.
Below is the code we are using
grdOrders.DataSource = Me.GetDataSource()
Me.grdOrders.DataBind()
Private Function GetDataSource() As UltraDataSource
Dim dataSource As New UltraDataSource()
Try
dataSource.Rows.Clear()
For Each clmn In grdOrders.DisplayLayout.Bands(0).Columns
If (clmn.Style = ColumnStyle.Date Or _
clmn.Style = ColumnStyle.Time
Or _
clmn.Style = ColumnStyle.DateTime)
Then
dataSource.Band.Columns.Add(clmn.Key,
GetType(DateTime))
ElseIf (clmn.Style = ColumnStyle.Double) Then
GetType(Double))
Else
dataSource.Band.Columns.Add(clmn.Key)
End If
Next
For Each tripStop In _ordersCollection
tripStop.GUICreatedFrom = GUIOrderCreatedType.Unallocated
Dim arrData As New ArrayList()
Dim orderLocation = Me.GetImportLocationDataForDO(tripStop.DeliveryOrderData.LocationId)
arrData.Add(tripStop.DeliveryOrderData.DeliveryPointdata.ExamGroupGeneralDTO.ProductType)
arrData.Add(tripStop.DeliveryOrderData.OriginatedID.ToString())
arrData.Add(tripStop.DeliveryOrderData.DeliveryPointdata.ExamGroupGeneralDTO.Installations(0).InstallationGeneral.DpVesselID)
arrData.Add(tripStop.DeliveryOrderData.DeliveryPointdata.ExamGroupGeneralDTO.Installations(0).InstallationGeneral.Description)
arrData.Add(tripStop.EarliestArrival)
arrData.Add(tripStop.LatestArrival)
arrData.Add( _
If(tripStop.DeliveryOrderData.DeliveryVolumeType _
= BLAC.Common.ApplicationConstants.SystemConstants.INSTALLATION_DELIVERYVOLUMETYPE_FILL_TANK,
True, False))
= BLAC.Common.ApplicationConstants.SystemConstants.INSTALLATION_DELIVERYVOLUMETYPE_ATLEAST,
= BLAC.Common.ApplicationConstants.SystemConstants.INSTALLATION_DELIVERYVOLUMETYPE_FIXED,
arrData.Add(
If(tripStop.DeliveryOrderData.DeliveryOrderLineData.Count <= 0, 0, tripStop.TotQtyPTEstimated))
arrData.Add(tripStop.DeliveryOrderData.DocNo)
If(orderLocation IsNot Nothing, orderLocation.LocationName, String.Empty))
arrData.Add(tripStop.DeliveryOrderData.DeliveryPointdata.ExamGroupGeneralDTO.DPID)
arrData.Add(UIManager.GetGradeCode(tripStop.DeliveryOrderData.DeliveryPointdata.ExamGroupGeneralDTO.GradeID))
dataSource.Rows.Add(arrData.ToArray())
dataSource.Rows(dataSource.Rows.Count - 1).Tag = tripStop
Catch
Throw ex
End Try
Return dataSource
End Function
Hello suneelsunkara,
Could you please try to attach if possible a small sample project reproducing the above mentioned issue(as I am not able to do so) with the code you provided, I will be happy to take a look at it.
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.