ListView Default Button

Discussion in 'ASP .Net Web Controls' started by pneuvil1, Mar 16, 2010.

  1. pneuvil1

    pneuvil1 Guest

    I drag a listview control onto a form and attach it to a table in mssql 2008
    and enable all modes.
    It displays great with the bottom row being an insert row for new data.
    I type data into the row and naively hit the enter key expecting the row of
    data to be added to the table. Instead, because the very first button in the
    first row is the default button. I delete the first row in the table instead
    of adding a new row. What a surprise.

    So I try to set the default button like this: form1.DefaultButton =
    InsertButton.ID.ToString (), but I get a InsertButton does not exists in
    the current context.
    The insert button in the list view control is not visible to the code behind
    file, and it doesn’t show up in intellisense.

    How would you set the default button in a list view to something other than
    the delete button. Like maybe the Insert button.
    pneuvil1, Mar 16, 2010
    #1
    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. Srinivasa Rao Penubarthi

    ListView in .NET

    Srinivasa Rao Penubarthi, Jul 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    11,530
    Jay B. Harlow [MVP - Outlook]
    Jul 22, 2003
  2. Andrew Crowe
    Replies:
    2
    Views:
    16,258
    Jukka K. Korpela
    Feb 6, 2004
  3. AlecL
    Replies:
    2
    Views:
    811
    Alexey Smirnov
    Feb 12, 2007
  4. shapper
    Replies:
    4
    Views:
    10,407
    David
    Nov 20, 2008
  5. .
    Replies:
    0
    Views:
    706
Loading...

Share This Page