Welcome to the Xceed Community | Help
Community Search  
More Search Options

Cannot perform this operation while the generator is busy generating items

Sort Posts: Previous Next
  •  04-05-2012, 3:31 AM Post no. 31957

    Cannot perform this operation while the generator is busy generating items

    Hello Sir,

    I Am using XCeed DG V4.2 and while Scrolling Grid I Got this error  "Cannot perform this operation while the generator is busy generating items"

     As In My dataGrid I am Using Combobox for some of my Field.

    I have 2 Issues:

    1: Get Above Error while Scrolling DataGrid 

    2. while scrolling Its Execute GridColumnComboBox_SelectionChanged Is Executed. which is wrong while Scrolling so how to handle this??

    Some Of Code For GridControl and CoboBinding as Below:

    <Xceed  x:Name="gdMaster" OnGridRowButtonClicked="btnAddTradeDetail_Click" Grid.Row="1"  
                                                AutoCreateColumns="True" OnGridMouseDoubleClick="gdMaster_MouseDoubleClick"
                                                OnGridRowGotFocus="OnRowGotFocus" LostFocus="gdMaster_LostFocus" ShowAddButtonInToolBar="False"
                                                ShowDeleteButtonInToolBar="False"
                                                EnableUDFs="True" GenerateUDFsInDetailGrid="True"
                                                ReferInventoryCodeFromRow="True" InventoryCodeColumnName="IDtblInventoryMst"
                                                OnGridPreviewKeyDown="gdMaster_RowKeyDown"  AllowGridDetailToggle="True"
                                                EditTriggers="BeginEditCommand,ActivationGesture,RowIsCurrent"
                                                TabIndex="50" CellEditorDisplayConditions="MouseOverCell" ItemScrollingBehavior="Immediate"
                                                Height="Auto"  ShowGridFooter="True"
                                                OnUDFComboSelectionChanged="UDF_SelectionChanged">

    For ComboBox Binding:

    public

    FrameworkElementFactory BindComboInDetail(string GridColumnName, string FieldName, string DisplayField, ref DataTable ComboData, bool IsComboEditable)

    {

    try

    {

    DataTemplate dtTemplate = new DataTemplate();

    ComboBox cmb = new ComboBox();

    FrameworkElementFactory fef = new FrameworkElementFactory(typeof(ComboBox));

    Binding listBinding = new Binding();

    Xceed.Wpf.DataGrid.Markup.

    CellEditorBindingExtension cellEditorBinding = new Xceed.Wpf.DataGrid.Markup.CellEditorBindingExtension();

    listBinding.Source = ComboData;

    fef.SetValue(

    ComboBox.NameProperty, "cmb" + GridColumnName);

    fef.SetValue(

    ComboBox.IsEditableProperty, IsComboEditable);

    cellEditorBinding.NotifyOnSourceUpdated =

    true;

    cellEditorBinding.NotifyOnTargetUpdated =

    true;

    fef.SetValue(

    ComboBox.SelectedValuePathProperty, FieldName);

    fef.SetValue(

    ComboBox.DisplayMemberPathProperty, DisplayField);

    fef.SetValue(

    ComboBox.SelectedValueProperty, cellEditorBinding.ProvideValue(null) as BindingBase);

    fef.SetBinding(

    ComboBox.ItemsSourceProperty, listBinding);

    fef.SetValue(

    ComboBox.ItemContainerStyleProperty, FindResource("cmbItem"));

    dtTemplate.VisualTree = fef;

    foreach (Xceed.Wpf.DataGrid.ColumnBase col in dgGrid.DetailConfigurations[0].Columns)

    if (col.FieldName.ToString().ToLower().Equals(GridColumnName.ToLower()))

    {

    col.CellEditor =

    new Xceed.Wpf.DataGrid.CellEditor();

    col.CellEditor.EditTemplate = dtTemplate;

    col.CellEditorDisplayConditions =

    CellEditorDisplayConditions.Always;

    col.CellContentTemplate = dtTemplate;

    col.AutoFilterControlStyle = MainGridPanel.FindResource(

    "textBlockDistinctValueItemTemplate") as Style;

    break;

    }

    fef.RemoveHandler(

    ComboBox.PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(Dropdown_PreviewMouseLeftButtonDown));

    fef.AddHandler(

    ComboBox.PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(Dropdown_PreviewMouseLeftButtonDown));

    return fef;

    }

    catch (Exception ex)

    {

    ToolWindow.getException(ex, this);

    }

    return new FrameworkElementFactory();

    }

    Please Provide Solution for these Issues.

    Thanks


    Regards,

    Yagnesh Kachhadia
    Filed under:
  •  04-17-2012, 5:03 AM Post no. 32000 in reply to 31957

    Re: Cannot perform this operation while the generator is busy generating items

    Hellos sir..

    Is Anybody Live There??????


    Regards,

    Yagnesh Kachhadia
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.