This is a migrated thread and some comments may be shown as answers.

Prevent updating binding properties on column size change.

1 Answer 43 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Tegu
Top achievements
Rank 1
Tegu asked on 01 Dec 2018, 07:12 PM

Hello,

There is a RadDataGrid with couple of DataGridTemplateColumns. One of the column contains a MediaPlayerElement as a video preview.

The realized problem is when I am changing any column's size, the grid and all of the contained element's bindings are automatically read again. It causes a couple of error (and ugly behavior) on the MediaPlayerElement, the rest of the columns are working fine.

 

The Grid:

        <telerikGrid:RadDataGrid x:Name="GridVideoFiles" Grid.Row="1" UserEditMode="External" AutoGenerateColumns="false" UserFilterMode="Disabled" UserGroupMode="Disabled"
                                 ColumnResizeHandleDisplayMode="Always"
                                 DragOver="UIElement_OnDragOver" AllowDrop="True"
                                 Drop="UIElement_OnDrop"
                                 ItemsSource="{Binding VisionFiles}">

The given column:

                <telerikGrid:DataGridTemplateColumn Header="Video Player" SizeMode="Fixed" Width="300" CanUserResize="False">
                    <telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                        <DataTemplate>
                            <Grid Width="300">
                                <MediaPlayerElement Width="300" Source="{Binding Media, Mode=OneTime}" AreTransportControlsEnabled="True">
                                    <MediaPlayerElement.TransportControls>
                                        <MediaTransportControls IsCompact="True"/>
                                    </MediaPlayerElement.TransportControls>
                                </MediaPlayerElement>
                            </Grid>
                        </DataTemplate>
                    </telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                </telerikGrid:DataGridTemplateColumn>

 

Can you tell me any solution to prevent the binded Media property updating automatically?

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 05 Dec 2018, 11:21 AM
Hello,

I have just test the described case in a basic setup with RadDataGrid, however, the bindings are not fired during column resizing.  I have attached my test project, could you download it and give it a try? Can you modify it with your code, so that the issue could be replicated and send it back to us?

Thanks in advance

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Tegu
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or