5 Answers, 1 is accepted
Can you provide more info about your scenario and what exactly is not working?
Regards,Vlad
the Telerik team
Yes, I have a grid that has an image field, the image is not stored in the database, so I fetch the images from the server and then want to rebind the grid when the images arrive,
The images do arrive, and if I scroll the grid the images appear when the row comes back into focus. I've changed nothing since the update.
here is my code:
private
void Athlete_Image_Here(InvokeOperation io)
{
if (io.HasError)
{
io.MarkErrorAsHandled();
}
else
{
IEnumerable<ProfileImage> friendsG =(
IEnumerable<ProfileImage>)io.Value;
foreach (ProfileImage prof in friendsG)
{
tblAthlete ath = GC_Service.tblAthletes.Where(a => a.id == prof.id).FirstOrDefault();
if (ath != null)
{
byte[] image = prof.img;
ath.ProfileImage_Blob = image;
}
}
this.WallView.Rebind();
}
}
<
ControlTemplate x:Key="MyCustomRowTemplate" TargetType="telerik:GridViewRow">
<Border x:Name="rowsContainer" Background="Transparent" Padding="5,5,5,0">
<Border x:Name="selectedRow"
BorderThickness="0,0,0,1" BorderBrush="#FF000000">
<Border.Background>
<SolidColorBrush Color="White" Opacity="1"></SolidColorBrush>
</Border.Background>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Stretch" >
<Image Source="{Binding tblAthlete.ProfileImage_Blob, Converter={StaticResource MyBinaryConverter}}" Width="40" Height="40" Margin="5" VerticalAlignment="Top" Stretch="UniformToFill"></Image>
<HyperlinkButton Padding="0,5" Content="{Binding tblAthlete.Name}" x:Name="btnAthName" Click="btnAthName_Click" VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="5" Tag="{Binding tblAthlete}" Foreground="{StaticResource ButtonBrushKey}" />
<TextBlock Padding="0,5" VerticalAlignment="Top" Text="{Binding ., Converter={StaticResource MyMessageConverter}}" TextWrapping="Wrap" Margin="5" MaxWidth="500"></TextBlock>
<HyperlinkButton x:Name="WallPost" Click="WallPost_Click" Padding="0,5" VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="5" Tag="{Binding }" Foreground="{StaticResource ButtonBrushKey}" Content="{Binding ApplicationStrings.details, Source={StaticResource ResourceWrapper}}" Visibility="{Binding ., Converter={StaticResource MyWallDetailsFlagConverter}}" />
<TextBlock Padding="0,5" VerticalAlignment="Top" Text="{Binding dateAdded, Converter={StaticResource MyWallDateConverter}}" TextWrapping="Wrap" Margin="5" Foreground="DarkGray"></TextBlock>
</StackPanel>
<Button Grid.Column="1" Content="x" Foreground="DarkGray" HorizontalAlignment="Right" VerticalAlignment="Top" Cursor="Hand" Margin="5"
Visibility="{Binding AthleteID, Converter={StaticResource isMyPost}}" ToolTipService.ToolTip="Delete Post" Style="{StaticResource ImageButtonStyle}" Tag="{Binding }" Click="BtnDeleteWall_Clicked"></Button>
</Grid>
</Border>
</Border>
</ControlTemplate>
Any update on this? Has anything changed to break this?
Mike
Unfortunately we are not aware of any change that can break such scenario. Please send us small example demonstrating the different behavior compared to the previous via support ticket.
Kind regards,Vlad
the Telerik team
OK Thanks, I'll roll back some stuff if the Q1 release didn't break this
Thanks,
Mike