DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 08 Aug 2007 12:44:57 -0000,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    Mia


Data in modified dataset will not show up in datagrid.   
Hi,

I have a problem with the following scenario.

I am sending in a dataset into a function where I delete certain rows,
I am deleting the data through a DataView which deletes from the
Dataset.datatable. When I try to display the dataset in a datagrid
after having modified it only the headers will show up. I know there
is data in the dataset, it shows up in the command window. I would
very much appreciate any ideas, thanks!! Mia

Here is the code for the function

Public Function DeleteOrderDetail(ByVal vCrit As ArrayList, ByRef
dsData As DataSet, ByRef iCartItems As Integer)
        Dim iRet As Integer
        Dim sErr As String
        Dim iLoop As Integer
        Dim iNum As Integer
        Dim oSW As StreamWriter
        Dim dvStyle As New DataView
        Dim dvSize As New DataView
        iRet = CI_FAILURE
        Try
            dvStyle.AllowDelete = True
            dvSize.AllowDelete = True
            dvStyle = dsData.Tables(1).DefaultView
            dvSize = dsData.Tables(2).DefaultView
            dvStyle.RowFilter = dsData.Tables(1).Columns(2).ColumnName
& "='" & _
                                      vCrit(0).ToString & "'"
            iNum = dvStyle.Count - 1
            While iNum >= 0
                dvSize.RowFilter =
dsData.Tables(2).Columns(1).ColumnName & "='" & _
                                       dvStyle(iNum).Item(0).ToString
& "'"
                iLoop = dvSize.Count - 1
                While iLoop >= 0
                    dvSize(iNum).Row.Delete()
                    iLoop -= 1
                End While
                dvStyle(iNum).Row.Delete()
                iNum -= 1
            End While
            iRet = CI_SUCCESS
        Catch ex As
Exception
            iRet =
CI_FAILURE_CATCH
            sErr = "fnWholesale.DeleteOrderDetail, " & DateTime.Now &
", " & ex.ToString _
            & ", " &
ex.Message
            oSW = New
StreamWriter(System.AppDomain.CurrentDomain.BaseDirectory.ToString _
            & CS_WHLSE_LOG,
True)
 
oSW.WriteLine(sErr)
 
oSW.Close()
 
Finally
            oSW =
Nothing
        End
Try
        Return
iRet
    End Function
Date:Wed, 08 Aug 2007 12:44:57 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us