Getting Datagrid Column Value - should be easy

Posted on 2006-04-30
Last Modified: 2010-04-16
Hello all.  I have a loop where currently I am getting the datakey field and appending to a pipe delimiter.  I want to do the same with a column field.  There is a column field called Qty I know the column number as well.  I want to get the value of this column through my loop what do I need?  Here is the loop.  I tried drCust.Columns but I must be missing stuff.  Thanks

      foreach (DataGridItem dgitem in this.dgCust.Items)
            pipedBP = pipedBP + dgCust.DataKeys[dgitem.ItemIndex].ToString() + "|";

            //Now here I want to grab the value of my column 6 which is a Qty field.             
Question by:sbornstein2
    1 Comment
    LVL 6

    Accepted Solution

    You can use


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    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…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    761 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

    9 Experts available now in Live!

    Get 1:1 Help Now