- Home
- Forum
- Xamarin.Forms
- Go to next edit cell
Go to next edit cell
Attachment: GridEditSample_4714b6ef.zip
Thanks for contacting Syncfusion support,
Your requirement can be achieved by creating the new custom cell renderes for SfDataGrid.CellRenderes. In that custom cell renderes we can end edit the cell when press done key on device keyboard. For more details please refer the below code example and attached sample.
Code Example,
|
[GridPage.Xaml.CS]
…. dataGrid.CellRenderers.Remove("TextView"); dataGrid.CellRenderers.Add("TextView", new CustomTextViewRenderer(this.dataGrid));
….. internal class CustomTextViewRenderer : GridCellTextViewRenderer {
SfDataGrid grid;
public CustomTextViewRenderer(SfDataGrid dataGrid)
{
grid = dataGrid;
}
protected override SfEntry OnCreateEditUIView()
{
var view = new CustomSfEntry(grid);
return view;
}
}
internal class CustomSfEntry : SfEntry
{
SfDataGrid dataGrid;
public CustomSfEntry(SfDataGrid sfDataGrid)
{
dataGrid = sfDataGrid;
this.Completed += CustomSfEntry_Completed;
}
private void CustomSfEntry_Completed(object sender, EventArgs e)
{
this.dataGrid.EndEdit();
}
} |
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/GridEditSample_4714b6ef_modified-201092605.zip
We hope this helps, please let us know if need further assistance from us.
Regards,
Karthik Raja
Attachment: GridEditSample1_7b3c5dae.zip
Thanks for contacting Syncfusion support,
We have moved your business logic from CurrentCellEndEdit Event to CompletedEvent on CustomRenderer of NumericTextBox. This is the most reliable way to achieve your requirement. For more details please refer to the below code snippet and attached sample.
Code Example,
|
….
private void CustomSfEntry_Completed(object sender, EventArgs e) {
this.dataGrid.EndEdit();
this.dataGrid.BeginEdit(this.dataGrid.CurrentCellManager.RowColumnIndex.RowIndex + 1, this.dataGrid.CurrentCellManager.RowColumnIndex.ColumnIndex);
} …. |
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/GridEditSample_4714b6ef_modified_2e1468237406.zip
We hope this helps, please let us know if need further assistance from us.
Regards,
I have The same issue requirement in my app but this can't work on xamarin forms 5.0.02337 and SfDataGrid(19.4.0.54). What could be the problem. Am i missing something. I took the same sample and run using the latest nuget packages for SfDataGrid and it doesn't fire the events for Completion of Entry.
I would appreciate any assistance. this has made my project stall for days now. Thanks
Thank you so much. I have checked the sample and it is working well with syncfusionDatagrid version 18.4.0.49 on Android platform but it doesn't fire on Universal Windows platform(UWP)
Hallo Venkatesan.
I am grateful for the progress we have come so far on the issue. I am still stuck on the UWP issue and would appreciate any breakthrough for the team. Thank you so much for your tireless work together with syncfusion team.
Thank you syncfusion support. It has now worked both on Android and UWP for sfDataGrid version 18.4.0.49. This has revived my project from collapse. Thank you much now i can continue with my xamarin form cross platform project using syncfusion.
Regards
Felix
Hi Felix,
Thanks for the update . Please let us know if you need further assistance. As always, we are happy to help you out.
Regards,
Suja
- 13 Replies
- 4 Participants
-
MR Maxence Roberge
- Jan 7, 2020 07:42 PM UTC
- May 2, 2022 03:19 PM UTC