Home Forums WPF controls Xceed DataGrid for WPF Column Configuration

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

    Is there a GUI for configuring a column’s cell editor and databinding, or do I have to do this manually in XAML? 

     

    Imported from legacy forums. Posted by Paul (had 503 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Paul,

    The current version of the GUI designer does not support configuring cell editors. That being said column’s already have a default cell editor appropriate for its data type. If you want to change the cell editor or create a new one, then you will need to do this in XAML.

       <xcdg:DataGridControl x:Name="OrdersGrid"
                            ItemsSource="{Binding Source={StaticResource cvs_orders}}">
        <xcdg:DataGridControl.Columns>

         <xcdg:Column FieldName="ShipVia">
           
    <xcdg:Column.CellEditor>
             
    <xcdg:CellEditor>
               
    <xcdg:CellEditor.EditTemplate>
                 
    <DataTemplate>
                   
    <Slider Value="{xcdg:CellEditorBinding}" Minimum="1" Maximum="3"/>
                 
    </DataTemplate>
               
    </xcdg:CellEditor.EditTemplate>
               
    <xcdg:CellEditor.ActivationGestures>
                 
    <xcdg:KeyActivationGesture Key="Right"/>
                 
    <xcdg:KeyActivationGesture Key="Left"/>
               
    </xcdg:CellEditor.ActivationGestures>
             
    </xcdg:CellEditor>
           
    </xcdg:Column.CellEditor>
         
    </xcdg:Column>

        </xcdg:DataGridControl.Columns>
      </xcdg:DataGridControl>

     

    Imported from legacy forums. Posted by Jenny [Xceed] (had 1432 views)

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