This question is locked. New answers and comments are not allowed.
Did RadListView provides the events that will be fired while items will slide in or out of screen, like PreparedContainerForItem or ClearedContainerForItem, while provided by the ListView implementation of Microsoft. I need those events to do some preprocessing or clean up works for each item, but I cannot find any document about it. Thank you
3 Answers, 1 is accepted
0
Hello Neo,
Thank you for contacting us! Currently RadListView does not offer such virtual methods to override. We are considering exposing such API in the future.
If you share some details regarding the scenario you are looking to achieve we can suggest alternative solution with the existing API
Regards,
Tsvyatko
Telerik
Thank you for contacting us! Currently RadListView does not offer such virtual methods to override. We are considering exposing such API in the future.
If you share some details regarding the scenario you are looking to achieve we can suggest alternative solution with the existing API
Regards,
Tsvyatko
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
0
Neo
Top achievements
Rank 1
answered on 07 Jan 2016, 01:46 AM
Hi Tsvyatko
Thank you for your reply. yes we do need the alternative solution. Our using scenario is that all data to fill the RadListView item is encrypted, we need to execute the decrypt operation before the corresponding items are displayed on the screen. Thank you.
Best Regard
Neo
0
Hi Neo,
Depending on the specifics of the described scenario you can go with one of the following options:
1. Create Decode converter for the individual display data:
2. If the scenario requires creating of a separate decoded object create decode converter that projects datacontext to a new decoded object:
Regards,
Tsvyatko
Telerik
Depending on the specifics of the described scenario you can go with one of the following options:
1. Create Decode converter for the individual display data:
<
Grid.Resources
>
<
local:DecodeConverter
x:Key
=
"Converter"
/>
</
Grid.Resources
>
<
telerik:RadListView
ItemsSource
=
"{Binding}"
>
<
telerik:RadListView.ItemTemplate
>
<
DataTemplate
>
<
Grid
>
<
TextBlock
Text
=
"{Binding ID, Converter={StaticResource Converter}}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadListView.ItemTemplate
>
</
telerik:RadListView
>
public
class
DecodeConverter : IValueConverter
{
public
object
Convert(
object
value, Type targetType,
object
parameter,
string
language)
{
//Add decode logic
return
((
int
)value) + 100;
}
public
object
ConvertBack(
object
value, Type targetType,
object
parameter,
string
language)
{
throw
new
NotImplementedException();
}
}
2. If the scenario requires creating of a separate decoded object create decode converter that projects datacontext to a new decoded object:
<
Grid.Resources
>
<
local:DecodeConverter
x:Key
=
"Converter"
/>
</
Grid.Resources
>
<
telerik:RadListView
ItemsSource
=
"{Binding}"
>
<
telerik:RadListView.ItemTemplate
>
<
DataTemplate
>
<
Grid
DataContext
=
"{Binding Converter={StaticResource Converter}}"
>
<
TextBlock
Text
=
"{Binding ID}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadListView.ItemTemplate
>
</
telerik:RadListView
>
public
class
DecodeConverter:IValueConverter
{
public
object
Convert(
object
value, Type targetType,
object
parameter,
string
language)
{
var data = value
as
Data;
if
(data!=
null
)
{
return
new
DecodedData { ID = data.ID + 100 };
}
return
null
;
}
public
object
ConvertBack(
object
value, Type targetType,
object
parameter,
string
language)
{
throw
new
NotImplementedException();
}
}
Regards,
Tsvyatko
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