Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridView problem
Message
From
13/06/2008 19:28:16
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01324014
Message ID:
01324029
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
Hi Linda,

I have a couple of questions and a couple of comments.

>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)
>        {

        ?? Why are you getting an empty data set here and below with oPatient first?

>            this.oPreCertif.GetEmptyDataSet();
>            string lcPatientId = " ";
>            if (this.txtLocPatientId.Text == null)

     ** You shouldn't need to do this if you already set it to " " above.

>                lcPatientId = " ";
>            else
>                lcPatientId = this.txtLocPatientId.Text;
>            if (lcPatientId != " ")
>            {

     ?? Did you set a break point here to verify what you are passing as this.txtLocPatientId.Text?

Alternatively, I would trace from here into your business object and step through your GetPreCertsByClientPaitentId to see what exactly is happening.

>                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.");
>                }
>            }
>
>        }
>
>
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform