Hi,
We have a grid with a add button a the top (see image below).
A click on the add button display the "AddNewRow" at the bottom of the grid :
this.myGrid.AddNewRowSettings.AllowAddNewRow = AddNewRowLocation.Bottom;
But user had to click inside the new row to start editing.
Is there a way to put user directly in edit mode inside the add new row ?
Thanks for your help.
Alain.
Hello Alan,
Thank you for you feedback. I am glad that you have solved your issue.
If you need any further assitance on this matter, feel free to aks.
I fixed my problem, but since I am using VB, I had to take a different approach with the Dispatcher.BeginInvoke syntax
Dispatcher.BeginInvoke(AddressOf BeginEditModeOnNewRow)
Private Sub BeginEditModeOnNewRow()
Dim c As Cell = Nothing Dim d As XamGrid = Me.dgDataEntry
c = d.Rows(d.Rows.Count - 1).Cells(0) c.IsActive = True d.EnterEditMode(c)
End Sub
Aha. There must be something going on with that. If I comment out your Dispatcher code, your sample throws the same exception. Now, if I could only figure out the VB equivalent syntax...
Hey Yanko,
I am trying something similar in my VB application, but I am getting an exception when I try either of these calls. One difference is that I am not using the Dispatcher.BeginInvoke syntax. Is that what could be causing the exception?
e.Cell.IsActive = True Me.dgDataEntry.EnterEditMode(c)
The exception reads somethink like :
Error HRESULT E_FAIL has been returned from a call to a COM component.
Hello,
Thank you for your feedback. I am very glad that you have solved your issue.