The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Here is the problem:
1. I give grid the focus
2. then call this.grid.CurrentCell.MoveTo( 1, 2, GridSetCurrentCellOptions.SetFocus ); which makes the grid loose focus
3. User presses tab while in cell [1,2].
4. In OnSaveChanges, I hide the usercontrol in cell [1,2].
5. .Net sets the focus to "next" control after the grid, since the grid lost focus in step2.
6. Your MoveTo moves the currentcell to [1,3], however the user cannot type anything in cell [1,3] because the focus neither the grid or the currentcell have focus due to step 5. This is the problem. Bug?
Things work fine if in OnSaveChanges, I do if
(this.CurrentCell.IsInMoveTo)
this.Grid.Focus();
ADAdministrator Syncfusion Team December 14, 2005 11:04 PM UTC
Is the grid the parent of the UserControl in cell 2,1?
ADAdministrator Syncfusion Team December 15, 2005 07:46 PM UTC
Yes.
ADAdministrator Syncfusion Team December 15, 2005 08:01 PM UTC
Since this is a custom cell, I think you will have to handle it in some manner. I do not think this is something we can control in a general way.
Here are some other ideas to try if you do not like the solution you can up with:
1) See if implementing this interface makes a difference
bool IQueryFocusInside.QueryFocusInside()
{
if (ContainsFocus)
return true;
else
{
foreach (Control c in this.Controls)
{
IQueryFocusInside qfi = c as IQueryFocusInside;
if (qfi != null)
{
if (qfi.QueryFocusInside())
return true;
}
}
}
return false;
}
2) Don’t hide the user control in OnSaveChanges. Instead hide the user control by overriding the Hide() method.
3) make sure you did call SetControl. If you called SetControl then the GridCellRendererBase.Hide method normally already takes care of properly hiding the control with proper focus management and ideas 1 and 2 should not be needed.
4) Set the following properties on the UserControl: .TabStop = false and .CausesValidation = false