Hello Gaurav,
The AutomationId property is attached one and in order to set it from code you will need to access them through the static class that holds them. Here is an example with the AutomationId property:
You can find more information on how to set attached properties in
this article.
Kind regards,
Kiril Vandov
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