Advertisement

06.04.2008 at 01:31PM PDT, ID: 23458266
[x]
Attachment Details

Get whole row of a dataset that is binded to a datagridview when user click on row is selected, get that information?

Asked by mathieu_cupryk in Microsoft Visual C#.Net, .NET, C# Programming Language

private void Form1_Load(object sender, EventArgs e)
  {
           
            DBWebService.DatabaseWS s = new DBWebService.DatabaseWS();
            ds = s.Get_Price_List_Header();
            this.dataGridView1.DataSource = ds.Tables[0];
            this.MainTabControl.TabPages.RemoveAt(3);
}

private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            // Get last row
            currRow = this.dataGridView1.CurrentRow;
            Get the row into a datatable or datarow? What ever corresponds to a row of a datagrid that will get all the values from the corresponding row in the dataset.
            // Get the row count
            int rowcount = this.dataGridView1.BindingContext[this.dataGridView1.DataSource].Count-1;
           
            // Mode 1
            //////////////////////////////////////////////////////
            if ((dataGridView1.SelectedRows[0].Cells[7].Value != null) && (rowcount >= this.dataGridView1.CurrentRow.Index))
            {
                string s = dataGridView1.SelectedRows[0].Cells[7].Value.ToString();
                ModeType = modeEnum.mode1;
                MessageBox.Show(s + " The Last Column was selected");
                MessageBox.Show("Load the header draft row into page nad move the path name into input textbox. Remove file from output folder. Enable all buttons. Readonly for textboxes. Disable PoolYear and List No. Save and update price_list_hdr", "My Application",
                                 MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
            }
            ////////////////////////////////////////////////////

         
            this.MainTabControl.SelectTab(1);

        }Start Free Trial
[+][-]06.04.2008 at 02:42PM PDT, ID: 21714398

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 04:53PM PDT, ID: 21715386

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 06:43PM PDT, ID: 21715838

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 06:46PM PDT, ID: 21715848

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 10:35PM PDT, ID: 21716610

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .NET, C# Programming Language
Sign Up Now!
Solution Provided By: anarki_jimbel
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628