Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Cells selection
posted

Hi, is it possible to select cells in XamDataGrid by holding the left button and dragging? If not, is it possible to simulate this somehow? Thank you for any answer.

Lukas

Parents
  • 140
    posted

    Ok I found what is wrong. I am using Style for CellValuePresenter:

    <Style x:Key="CellStyle" TargetType="igDP:CellValuePresenter" BasedOn="{x:Static igThemes:DataPresenterOffice2010Blue.CellValuePresenter}">
                <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
                                <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type igDP:CellValuePresenter}}, Path=Value}" Background="Transparent" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
            </Style>

    But now I can't see cells that should be selected. Is there a way around this?

    Test.zip
  • 140
    Verified Answer
    posted in reply to Lukas Rumpala

    Ok I solved it with help of this post http://ko.infragistics.com/community/forums/t/77613.aspx . Template override whole template of cell. Define ContentTemplate is much more better.

    <Style x:Key="statCellTemplate" TargetType="igDP:CellValuePresenter">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding Value}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Reply Children
No Data