Dependency enter always on event

Hello,

We have a problem with a: GridComboBoxColumn.DataSourceSelector

The thread was:

We detect that anything you do in the editor goes into the event and slows everything down a lot. Since we obtain information from database.
We are interested that if they modify a specific field, the function is loaded. but only if a specific field is modified

we download the sample from github.

thanks




3 Replies

VS Vijayarasan Sivanandham Syncfusion Team September 2, 2020 09:40 AM UTC

Hi Mel,

Thank you for contacting Syncfusion support.

Based on provided information we suspect that your mentioned Dependcy enter always into event. In this case can you please provide which event your mentioned. We are little unclear with your query.

Can you please share us below things?
       
        1. Brief replication procedure/video illustration of the reported issue
        2. Please provide the more information related to your query?
        3. if they modify a specific field, the function is loaded, can you please provide which specific field your mentioned? 
It will be helpful for us to check on it and provide you the solution at the earliest.

Regards,
Vijayarasan S 



ME Mel September 2, 2020 10:06 AM UTC

Hello,

We want, when changes column IdTercero the combo of email display a list of emails. (one customer selected on first column, on the second column multiple list customer´s emails)


The problem it´s that do anything on grid: mouse over, type text in other columns, always enter on: CustomSelectorEmailTercero and be slow slow slow

We have the next code:


dgNotificacion.DataSource = correspondenciaNotificaciones;

dgNotificacion.EditorSelectionBehavior = EditorSelectionBehavior.SelectAll;
dgNotificacion.Columns.Clear();

dgNotificacion.Columns.Add(
new GridComboBoxColumn()
{
MappingName = "IdTercero",
HeaderText = "Tercero",
DataSource = tercerosNotificaciones,
ValueMember = "IdTercero",
DisplayMember = "Tercero",
AutoSizeColumnsMode = AutoSizeColumnsMode.Fill,
ValidationMode = GridValidationMode.InEdit,
DropDownStyle = DropDownStyle.DropDown,
AutoCompleteMode = AutoCompleteMode.Suggest,
AutoSuggestMode = AutoCompleteSuggestMode.Contains,
AutoSuggestDelay = 300
});

dgNotificacion.Columns.Add(new GridComboBoxColumn()
{
MappingName = "Email",
HeaderText = "Email",
ValueMember = "IdEmail",
DisplayMember = "Email",
DropDownStyle = DropDownStyle.DropDownList,
IDataSourceSelector = new CustomSelectorEmailTercero()
});

dgNotificacion.Columns.Add(
new GridComboBoxColumn()
{
MappingName = "TipoNotificacion",
HeaderText = "Tipo",
DataSource = tipoNotificaciones,
ValueMember = "Id",
DisplayMember = "Tipo",
MinimumWidth = 90,
AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells,
ValidationMode = GridValidationMode.InEdit,
DropDownStyle = DropDownStyle.DropDown,
AutoCompleteMode = AutoCompleteMode.Suggest,
AutoSuggestMode = AutoCompleteSuggestMode.Contains,
AutoSuggestDelay = 300
});

dgNotificacion.Columns.Add(
new GridTextColumn()
{
MappingName = "Observaciones",
HeaderText = "Observaciones",
MinimumWidth = 190,
AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells,
ValidationMode = GridValidationMode.InEdit,
});

dgNotificacion.Columns.Add(
new GridDateTimeColumn()
{
MappingName = "FechaHoraEnvio",
HeaderText = "Fecha envío",
Format = "dd/MM/yyyy HH:mm",
MinimumWidth = 110,
AllowNull = true,
AllowEditing = false,
AllowFiltering = false,
AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells,
ValidationMode = GridValidationMode.InEdit,
});

dgNotificacion.Columns.Add(new GridButtonColumn()
{
MappingName = "Enviar",
HeaderText = "Enviar",
AllowFiltering = false,
AllowDefaultButtonText = true,
DefaultButtonText = "",
ImageSize = new Size(16, 16),
AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells,
Image = Resources.Enviar_16,
CellStyle = new Syncfusion.WinForms.DataGrid.Styles.CellStyleInfo { HorizontalAlignment = HorizontalAlignment.Center },
});

dgNotificacion.Columns.Add(new GridButtonColumn()
{
MappingName = "Eliminar",
HeaderText = "X",
AllowFiltering = false,
AllowDefaultButtonText = true,
DefaultButtonText = "",
ImageSize = new Size(16, 16),
AutoSizeColumnsMode = AutoSizeColumnsMode.AllCells,
Image = Resources.feEliminar_16,
CellStyle = new Syncfusion.WinForms.DataGrid.Styles.CellStyleInfo { HorizontalAlignment = HorizontalAlignment.Center },
});


 public class CustomSelectorEmailTercero : IDataSourceSelector
    {
        IEnumerable IDataSourceSelector.GetDataSource(object record, object dataSource)
        {
            if (dataSource == null)
                return null;
            if (record == null)
                return null;

            CorrespondenciaNotificaciones correspondenciaNotificacion = record as CorrespondenciaNotificaciones;
            int idTercero = correspondenciaNotificacion.IdTercero ?? 0;

            TerceroCN terceroCN = new TerceroCN();
            var emails = terceroCN.ObtenerEmailsTercero(idTercero);

            return emails;
        }
    }

Thanks


VS Vijayarasan Sivanandham Syncfusion Team September 3, 2020 04:42 PM UTC

Hi Mel,

Thanks for the update.

We have checked the reported issue “ComboBox with IDataSourceSelector delay performance in SfDataGrid” and unable to replicate the issue from our end. it is working fine as expected. Please find the tested sample and video demo from our end in the below link,
 
  
 
 
Can you please share us below things?
       
        1. Brief replication procedure/video illustration of the reported issue


 
if you still facing the same issue? If yes, please modify the sample based on your scenario.  
   
It will be helpful for us to check on it and provide you the solution at the earliest.     
   
Regards,   
Vijayarasan S

Loader.
Up arrow icon