Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For each Row
Message
 
À
02/08/2007 10:20:02
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01245258
Message ID:
01245527
Vues:
14
Bonnie:

I dont have problem appliying the filter and displaying the filter. The problem is that in the grid I have a checkbox in the header that will do the function of select all or unselect all. The rutine go throw all each row and change the value to true if was selected or false if was unselected. But when I remove the filter all the rows are selected instead of the row that are filter. Here is the code for the select all process.
Private Sub aCheckBoxOnHeader_CreationFilter_HeaderCheckBoxClicked(ByVal sender As Object, ByVal e As CheckBoxOnHeader_CreationFilter.HeaderCheckBoxEventArgs) Handles aCheckBoxOnHeader_CreationFilter.HeaderCheckBoxClicked
        If e.Header.Column.Key = "Lsele" Then
            Dim Cvalue As String
            Dim drdepts As DataRow
            Dim I As Integer
            Dim rposition As CurrencyManager

            rposition = CType(Me.BindingContext(DsINV_AssetsDepreciation_Lookup.INV_AssetsDepreciation_Lookup), CurrencyManager)
            Me.DsINV_AssetsDepreciation_Lookup.GetChanges()
            rposition.Position = 0
            I = 0
            Cvalue = e.Header.Column.ToString

            Me.GrdlAssetDepreciation.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.FirstRowInGrid)
            If Cvalue = "Lsele" Then
                If e.CheckState = CheckState.Unchecked Then
                    Me.Fill_Refresh_Grid()
                    Me.AssetDepreciationPKList.Clear()
                    Me.AssetPKList.Clear()
                    I = 0
                Else

                    For Each drdepts In Me.dv.Table.Rows
                        drdepts("Lsele") = 1
                        AssetDepreciationPKList.Add(drdepts("AssetsDepreciationPK"))
                        AssetPKList.Add(drdepts("AssetsFK"))
                        If I < Me.GrdlAssetDepreciation.Rows.Count Then
                            With Me.GrdlAssetDepreciation.Rows(I).Appearance
                                .BackColor = My.Settings.Color4
                                .BackColor2 = My.Settings.Color4
                            End With

                            I = I + 1

                        End If

                    Next drdepts
                    Me.Add_btn.Focus()
                End If
                Dim xx As Integer
                System.Math.DivRem(Me.GrdlAssetDepreciation.Rows.Count, 2, xx)
                If xx > 0 Then
                    If I = 0 Then
                        SetEditDeleteButtons(False)
                        checkcount = 0
                    Else
                        SetEditDeleteButtons(True)
                        checkcount = Me.GrdlAssetDepreciation.Rows.Count
                    End If
                Else
                    If I = 0 Then
                        SetEditDeleteButtons(False)
                        checkcount = 0
                    Else
                        SetEditDeleteButtons(True)
                        checkcount = Me.GrdlAssetDepreciation.Rows.Count
                    End If
                End If
                Me.GrdlAssetDepreciation.Refresh()
            End If
        End If
    End Sub
Gregorio J. Placeres
IT Analyst
Uniform Accounting Network
Auditor of State of Ohio
88 East Broad Street
P.O. Box 1140
Columbus, Ohio 43216-1140

Tel. 614-728-4694

Gregorio_J@MSN.COM

http://www.gjpproductions.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform