P
pneuvil1
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.
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.