Re: telerikDataControls:RadListView
Re: Binding, Converter
Re: accessing object in code behind
See also: https://forums.xamarin.com/discussion/54042/using-binding-with-value-converters
It seems that the converter should have access to the "object" from the list (recall that a RadListView gets it's data from a list of objects). The proper notation appears to be like:
<Label Text="{Binding Path=., Converter={StaticResource stateConverter}, ConverterParameter='some parameter'}" />
The converter looks like:
public object Convert(object obj, Type targetType, object parameter, CultureInfo culture)
But "obj" is always null. How can I access the object in the converter?
Thanks!
6 Answers, 1 is accepted
If the Label you're showing below is in the RadListView's ItemTemplate, this is the syntax you're looking for.
<
Label
Text
=
"{Binding Converter={StaticResource stateConverter}, ConverterParameter='some parameter'}"
/>
This will pass the BindingContext of that DataTemplate to the value parameter of the converter.
For example, if your RadListView was bound to an ObservableCollection<Car>, your converter would work like this:
public
object
Convert(
object
value, Type targetType,
object
parameter, CultureInfo culture)
{
var car = value
as
Car;
}
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress


Looking at the syntax that you used, I suspect you're referring to Angular or Vue and using Kendo UI? This thread is about UI for Xamarin and Xamarin.Forms XAML.
- For Vue, find the Vue documentation here and
- For Angular, find the Angular documentation here.
If you did intend to post to the Xamarin topic, find the Xamarin Data Binding Documentation here (we don't have documentation for general programming topics like data binding).
If you wanted to post to the Kendo forums about a specific implementation, find a list of our forums here.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik

Hey Lance,
i'm actually struggling with the NativeScript DataForm. I guess Telerik in your signature through me off.
My apologies.
No worries. I just want to make sure you get the assistance you need in a timely manner. I think this is the information you were looking for: Using Converters in Bindings (NativeScript).
Here are some additional links for you to bookmark that I think will be helpful for you:
- NativeScript Forums
- DataBinding Documentation
- ListView Overview Documentation
I don't see a NativeScript support license in your account, so I can't direct you towards opening a support ticket. However, if you are using an enterprise license that has support, you can have your employer/manager assign you as one of the Licensed Users here in the Manage Licensed Users Portal.
Once you're assigned as a Licensed User, you can open Support Tickets here.
I hope I was able to answer your question, if you have any additional questions, you can post in the NativeScript forums (link above).
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik