Solved

Need to get a value from a datagrid.

Posted on 2006-10-23
3
148 Views
Last Modified: 2010-04-23
private void btnModifyScale_Click(object sender, EventArgs e)

{

if (grdScales.DisplayLayout.ActiveRow != null)

{

if (grdScales.Selected.Rows.Count == 1)

{

try

{

Voxco.Data.Scale _s = Voxco.Data.Manager.Scales.GetObject((int)grdScales.Rows[0].Cells[0].Value);

ScaleModificationForm _form = new ScaleModificationForm(_s);

_form.ShowDialog();

RefreshData();

}

catch (Exception ex)

{

MessageBox.Show(ex.Message);

}

}

}



This needs to be modified:

Voxco.Data.Manager.Scales.GetObject((int)grdScales.Rows[0].Cells[0].Value);

Otherwise I get the first row all the time.
0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
Naveen Swamy earned 500 total points
ID: 17788139
0
 
LVL 9

Expert Comment

by:Naveen Swamy
ID: 17788144

hope it helps you
0
 

Author Comment

by:mathieu_cupryk
ID: 17788157
Nope, I need to get the row selected?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET (VB) return a record 2 51
Groupbox Control ? 2 27
VB.Net - BackgroundWorker running multiple 5 47
"lblTime is not declared" 3 31
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question