Solved datagrid ButtonColumn for windows app

Posted on 2004-10-25
Last Modified: 2008-02-26
I am working with a datagrid and I am trying to add a button column.  I can not seem to find the buttoncolumn for a datagrid.  I am not sure if this is because I have only studio or if it because you can only use a button column for web apps.  

Here is my current code.

        Dim ts As DataGridTableStyle
        ts = New DataGridTableStyle
        ts.MappingName = DS1.Tables(0).ToString()
      Dim col1 As New DataGridTextBoxColumn
        With col1
            .MappingName = "StockNum"
            .HeaderText = "Stock #"
            .Width = 80
        End With

        Dim col2 As New DataGridTextBoxColumn
        With col2
            .MappingName = "Desc"
            .HeaderText = "Description"
            .Width = 80
        End With

        Dim col3 As New DataGridTextBoxColumn
        With col3
            .MappingName = "AskingPrice"
            .HeaderText = "Asking Price"
            .Width = 80
            .Format = "c"
            .Alignment = HorizontalAlignment.Right
        End With

        ts.GridColumnStyles.AddRange(New DataGridColumnStyle() {col1, col2, col3, col4, col5, col6, col7})
        With grdInventory
            .DataSource = DS1.Tables(0)
        End With

I want to add a column with  buttons for my first column that will bring up a details page.  
Question by:Tygh
    1 Comment
    LVL 69

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Anonabox PRO Tor & VPN Router

    PRO is the most advanced way to fortify your privacy and online anonymity by layering the Tor network with VPN services. Use both together or separately, and without needing to download software onto your devices.

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    884 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

    19 Experts available now in Live!

    Get 1:1 Help Now