Hi,
I have a very simple question, how to add new row to radgridview properly ?
I need to add new row from clicking on my button, and begin edit it.
OK, let me describe what is ugly from my point of view.
I have binding source connected with gridview. Here is my buttonClick event handler:
If
everything is OK, but if
behavior is ugly. Clicking first time, I'm getting new row selected, but not in edit mode, clicking one more and getting second row selected but not in edit mode (two rows selected !), and finally clicking one more time, I'm getting new row in edit mode.
I need to add new rows, but don't need "Click here to add new row" label (functionality)
Thank you.
I have a very simple question, how to add new row to radgridview properly ?
I need to add new row from clicking on my button, and begin edit it.
OK, let me describe what is ugly from my point of view.
I have binding source connected with gridview. Here is my buttonClick event handler:
private void button1_Click(object sender, EventArgs e) |
{ |
bindingSource1.AddNew(); |
radGridView2.Rows[radGridView2.Rows.Count - 1].Cells[1].BeginEdit(); |
} |
If
radGridView2.MasterGridViewTemplate.AllowAddNewRow = true; |
everything is OK, but if
radGridView2.MasterGridViewTemplate.AllowAddNewRow = false; |
behavior is ugly. Clicking first time, I'm getting new row selected, but not in edit mode, clicking one more and getting second row selected but not in edit mode (two rows selected !), and finally clicking one more time, I'm getting new row in edit mode.
I need to add new rows, but don't need "Click here to add new row" label (functionality)
Thank you.