Datagird extra row

Posted on 2005-04-12
Last Modified: 2010-04-23
On all my datagrids I have an extra row that allowd the user to add rows to the grid.  Is there anyway to get rid of this row?
Question by:pamwestphal
    LVL 28

    Accepted Solution

    set propert ReadOnly to True. User will not be able to add row

    If you still want to edit (but not to add) existing records then

      Dim CM As CurrencyManager

            CM = Me.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember)
            CType(CM.List, DataView).AllowNew = False
            CType(CM.List, DataView).AllowEdit = True

    Author Comment

    Setting the property to ReadOnly will make it so you can't add a new row but is there anyway to remove the row entirely?
    LVL 28

    Expert Comment

    The empty row with an * will not be there

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    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 …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 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