I need to force edit mode on one of griddatacontrol cells programmatically. When user enters particular value into one of grid editable cells I need to force him to insert some text into another colum, by switching focus, starting edit mode and making sure user did enter text (empty string validation). How can I achieve that ?
Hi Viban
Thanks for contacting Syncfusion support,
We have analyzed your query. If you want to force edit by programatically, you need to achieve by using MoveTo method. We have prepared a sample based on your requirement and you can download it from below attachment.
Please let us know if you have any queries,
Regards,
Saravanan.M
Hi
Ole,
Thanks for your update,
We have analyzed your query. You can add the new row when you click the button and you need to call BeginEdit(true) method to enter the edit mode where you can start type the data automatically. If you change the CurrentCell by pressing Tab/Arrow key it will automatically enter into edit mode. We need to hook CurrentCellMoved event and call the BeginEdit(true) method. Please refer the below code snippet to achieve your requirement.
Code snippet[C#]:
private void Button_Click(object
sender, RoutedEventArgs e) { this.SyncGrid.Model.CurrencyManager.CurrentCell.MoveTo(1,
0); this.SyncGrid.Model.CurrencyManager.CurrentCell.BeginEdit(true); }
|
We have prepared a sample based on your requirement and you can download the sample from the attachment.
Regards,
Saravanan.M