Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh DataGrid...?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Refresh DataGrid...?
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Divers
Thread ID:
01085820
Message ID:
01085820
Vues:
62
I am having a problem with the Microsoft DataGrid, and I am completely baffled. I had this code working perfectly before, then I must have dome something later on to break it, but darned if I know what I did.

I have a DataGrid that gets populated with an initial DataSet created by my application. Afterwards the user has the ability to change the filtering of that data being displayed. When a user makes a change, my application destroys the existing table (if it finds that it already exists) to insure that there is no old data preset by accident. It then creates a new Table with the same name as before and populates it with the new data, filtered as the user requested. After the data is retrieved, a routine runs to create/update the TableStyle for the table to be used in the grid. Lastly, the DataSource and DataMember properties of the Grid are updated and a Refresh() command is executed to update the data displayed on the grid.

My problem is that for some reason now, the data refuses to refresh on the screen. The underlying table feeding the Grid changes, I checked and verified that. But the new data is not being displayed on the Grid for some reason. Can anyone figure out what I am doing wrong? I am pasting some of my code below, hope it helps.

Note: objDatabase is a custome SQLDBWrapper Class.
        '***************************************
        ' Clear Existing Bindings On DataGrid
        '***************************************
        gridTickets.DataSource = Nothing
        gridTickets.DataMember = ""

        '***************************************
        ' Open Table Using SQL Statement Compiled
        '***************************************
        objDatabase.OpenTable(Me.FormID, "tblLog", strSQLStatement)

        '***************************************
        ' Format Data Grid (If Needed)
        '***************************************
        FormatDataGrid()

        '***************************************
        ' Bind DataSet To Grid Control
        '***************************************
        gridTickets.DataSource = objDatabase.DataSets(Me.FormID)
        gridTickets.DataMember = "tblLog"
        gridTickets.Refresh()
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform