Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridView problem
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
DataGridView problem
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01324014
Message ID:
01324014
Views:
52
I am using the mmBusinessForm with a tab control. The first page has several controls that are not bound to data for entering search criteria. It also has a grid to show the records located by the search. The second page has the details for the selected grid item.

The problem is that the grid is showing all the records in the table rather than just the records returned by the search. I have listed the code below. I had to change the name of the business object to something other than the table name because it is apparently a reserved word. I notice on the grid properties, when I pull up the edit columns, there is nothing there, even though the business object shows up on the bindingsource list.

The code for the locate function is listed below. Any ideas?

Thanks.
        private void btnFindRecord_Click(object sender, EventArgs e)
        {
            this.oPreCertif.GetEmptyDataSet();
            string lcPatientId = " ";
            if (this.txtLocPatientId.Text == null)
                lcPatientId = " ";
            else
                lcPatientId = this.txtLocPatientId.Text;
            if (lcPatientId != " ")
            {
                this.oPreCertif.GetPreCertsByClientPatientId(this.txtLocPatientId.Text);
                this.oPatient.GetEmptyDataSet();
                if (oPreCertif.GetRowCount() > 0)
                {
                    this.oPatient.GetPatientByClientPatientID(this.txtLocPatientId.Text);
                    if (oPatient.GetRowCount() > 0)
                    {
                        this.txtLocLastName.Text = this.oPatient.Entity.LastName;
                        this.txtLocFirstName.Text = this.oPatient.Entity.FirstName;
                    }
                }
                else
                {
                    MessageBox.Show("Unable to locate pre-certs meeting these criteria.");
                }
            }

        }
Linda Harmes
HiBit Technologies, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform