Need to select Gridview Row Column using Winforms

Posted on 2009-04-24
Last Modified: 2013-12-17

I am New to c# winforms. I have a gridview control on a winform in c#. It is populated and when I click my button I want to get the value at a specific row and column.

How DO I do that?

      DataSet ds = new DataSet();
      ds = ws.getUserList(a);  //  method returns data set
      GridView1.DataSource = ds.Tables[0];

then in my on_click

    private void btnEdit_Click(object sender, EventArgs e)
         Here get value of colum in selected row


Question by:charlesbaldo
    LVL 26

    Accepted Solution


    Author Comment

    No I saw that post. It is for a web froms gridview control. There is no selectedrow property in the winforms version

    Author Closing Comment

    Was able to figure it out from that link

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now