How To Disable New Row In DataGrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • honeyashu
    New Member
    • Jul 2008
    • 11

    How To Disable New Row In DataGrid

    Hi I've created a datagrid and all i want is to display only one record(which gets selected on selection of two parameters selected through comboboxes)..
    in the data grid on the second row * appears where we can add new data.. how can i disable that row when ever i fill that data grid through datatable...
    Any Suggestion ??
  • cloud255
    Recognized Expert Contributor
    • Jun 2008
    • 427

    #2
    You can disable this functionality via the properties panel of the datagrid.
    Check in the behaviour section.

    Comment

    • honeyashu
      New Member
      • Jul 2008
      • 11

      #3
      nothing exist like that... Behavior ( i m using vb.net 2005)

      Comment

      • cloud255
        Recognized Expert Contributor
        • Jun 2008
        • 427

        #4
        havent used VS2005 in a while, but i'm sure it is there, anyway, this will allow you to disable the function via code:

        DataGridView1.A llowUserToAddRo ws = false;

        good luck.

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          DataGrid isn't the same thing as DataGridView

          Comment

          • cloud255
            Recognized Expert Contributor
            • Jun 2008
            • 427

            #6
            Originally posted by insertAlias
            DataGrid isn't the same thing as DataGridView
            Indeed this is true, silly mistake on my part.

            honeyashu my apologies, i sent you in the complete wrong direction. the code i provided works on a windows from DataGridView control not the ASP DataGrid control which you are using.

            Thanks for the correction.

            My ASP.NET knowledge is scary so if you follow this link you will find some help

            Comment

            Working...