Not show last row in datagrid.

Discussion in 'ASP .Net Datagrid Control' started by J, Jul 13, 2004.

  1. J

    J Guest

    How do I not show the last row in a DataGrid (for C#). The last row
    which is empty, but allows for the user to enter info, which will then
    add a new row. I would like to prevent this... by showing only the
    rows which exist.
     
    J, Jul 13, 2004
    #1
    1. Advertising

  2. J

    J Guest

    (J) wrote in message news:<>...
    > How do I not show the last row in a DataGrid (for C#). The last row
    > which is empty, but allows for the user to enter info, which will then
    > add a new row. I would like to prevent this... by showing only the
    > rows which exist.


    Thank you. I figured this out:

    CurrencyManager cm =
    (CurrencyManager)BindingContext[dataGrid1.DataSource, "documents"];
    DataView dv = (DataView)cm.List;
    dv.AllowNew = false;
     
    J, Jul 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Craig
    Replies:
    2
    Views:
    2,899
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Nov 2, 2004
  2. Diego F.

    Printint datagrid: last row cut

    Diego F., Jun 8, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    395
    Diego F.
    Jun 8, 2005
  3. J

    Not show last row in datagrid.

    J, Jul 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    134
  4. D
    Replies:
    0
    Views:
    257
  5. ll
    Replies:
    2
    Views:
    688
    Thomas 'PointedEars' Lahn
    May 1, 2008
Loading...

Share This Page