Home Forums WPF controls Xceed DataGrid for WPF Maybe Bug InsertRow

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22214 |

    I created a combobox celleditor and here is the bug:
    when you insert a row using the insertion and the combobox celleditor is the current cell in the insertion row that cell becomes un-usable for future insertions. mouse or keyboard activities do nothing in that cell. I can click onto another cell and then back on the combobox editor and it works fine.

    this also happens when I filter the contents of the grid using a dataview.rowfilter i have to select another item in the grid then back on the insertion combobox cell.

    I have no activation gerstures defined. Is that my problem?

    Imported from legacy forums. Posted by MiddleTommy (had 4579 views)

    Xceed Support
    Member
    Post count: 5658

    Can you provide the code that initializes the DataGridControl and the CellEditor?

    Imported from legacy forums. Posted by Marcus [Xceed] (had 288 views)

    User (Old forums)
    Member
    Post count: 23064

    cell editor xaml
    <code> <xcdg:CellEditor x:Key=”UserCellEditor” x:Name=”UserCellEditor”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <ComboBox BorderThickness=”0″
    BorderBrush=”Transparent”
    Background=”Transparent”
    VerticalContentAlignment=”Top”
    SelectedValuePath=”UserName”
    DisplayMemberPath=”UserName”
    ItemsSource=”{Binding Source={StaticResource ulist}}”
    Text=”{xcdg:CellEditorBinding}” IsEditable=”False”>
    <ComboBox.Resources>
    <Style TargetType=”Popup”>
    <Setter Property=”TextElement.Foreground”
    Value=”{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}” />
    </Style>
    </ComboBox.Resources>
    </ComboBox>
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    </xcdg:CellEditor>
    </code>

    datagrid xaml
    <code>
    <xcdg:DataGridControl x:Name=”memberDG” SelectionMode=”Single” ScrollViewer.VerticalScrollBarVisibility=”Auto”/>
    </code>

    datagrid c#
    <code>
    private void InitGrids()
    {
    //this.userDG.AutoCreateColumns = true;
    DataTemplate template = new DataTemplate();
    template.VisualTree = new FrameworkElementFactory(typeof(InsertionRow));
    Xceed.Wpf.DataGrid.Views.TableView tv = null;
    CellEditor ce = LayoutRoot.Resources[“ModuleCellEditor”] as CellEditor;
    CellEditor uce = LayoutRoot.Resources[“UserCellEditor”] as CellEditor;

    DataTemplate cct = LayoutRoot.Resources[“CellClickContentTemplate”] as DataTemplate;

    DataView dv = new DataView(DS._MyCardsUsers);
    userDG.ItemsSource = dv;
    tv = new Xceed.Wpf.DataGrid.Views.TableView();
    tv.FixedHeaders.Clear();
    tv.Footers.Add(template);
    userDG.Columns[“Module”].CellEditor = ce;
    userDG.View = tv;

    dv = new DataView(DS.MyCardsGroupMembers);
    memberDG.ItemsSource = dv;
    tv = new Xceed.Wpf.DataGrid.Views.TableView();
    tv.Footers.Add(template);
    tv.FixedHeaders.Clear();
    memberDG.Columns[“UserName”].CellEditor = uce;
    //memberDG.Columns[“GroupName”].Visible = false;
    memberDG.View = tv;

    dv = new DataView(DS.MyCardsGroupPermission);
    accessDG.ItemsSource = dv;
    tv = new Xceed.Wpf.DataGrid.Views.TableView();
    tv.FixedHeaders.Clear();
    tv.Footers.Add(template);
    accessDG.Columns[“Module”].CellEditor = ce;
    accessDG.View = tv;

    dv = new DataView(DS.MyCardsGroups);
    groupDG.ItemsSource = dv;
    groupDG.Columns[“GroupName”].CellContentTemplate = cct;
    tv = new Xceed.Wpf.DataGrid.Views.TableView();
    tv.FixedHeaders.Clear();
    tv.Footers.Add(template);
    groupDG.AddingNewDataItem += new EventHandler<AddingNewDataItemEventArgs>(groupDG_AddingNewDataItem);//does not work with bound grid remove code.
    groupDG.View = tv;
    }

    </code>

    Imported from legacy forums. Posted by MiddleTommy (had 871 views)

    Xceed Support
    Member
    Post count: 5658

    I’ll take a look at this, thanks…

    I might not have time to check this today, but I’ll try to answer as soon as possible.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 328 views)

    Xceed Support
    Member
    Post count: 5658

    I have been trying to reproduce this issue for some time now, without success…

    I could not use the code your provided 100% as you indicated, since I do not have neither your data source nor your data objects (used in your combo box). So I have a service to ask of you.

    Do you think you would be able to create a simpler reproduction case? I mean by that: can you provide a “complete” project (where I have no chance of introducing my grain of salt, which would mess up the reproducibility). Either a simpler version of your already existing code or the full thing.

    If you can provide a reproduction project, you can send it to support@xceedsoft.com with “For Marc ( combo box issue)” in the topic.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 229 views)

    User (Old forums)
    Member
    Post count: 23064

    I will try
    I have had problems with any celleditor in the insertrow and after insert being able to click on the cell currently active in the insertionrow.
    The cell remains blue and wont turn white as if selected unless you click off to another cell then back on.

    Imported from legacy forums. Posted by MiddleTommy (had 363 views)

    User (Old forums)
    Member
    Post count: 23064

    I am glad to hear about the new forums coming
    Either this forum does not email me when I have new posts(most likely)
    or junk mail is catching this forums updates before it gets to my local junk controls.
    I have to remember to come back and check my posts for updates

    Imported from legacy forums. Posted by MiddleTommy (had 5811 views)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.