Why Doesn't Each Have an 'ID' Property?

2 posts, 0 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 24 Jan 2012 Link to this post

    I'm in the process of switching over all references to the AJAX Control Toolkit to using your controls.  On one of my pages I use their TabContainer.  In my work I discovered that the RadTab control does not have an "ID" property.  Why was this excluded?

    In my existing code I have one event handler method to do assorted things when the user switches tabs.  It needs to differentiate between each tab.  Oh sure, what I'll just do is look for the Text property of the tab but if that text ever changes then the code will break unless I go through and search & replace all references to the tab's text value.

    Which brings us full circle: Why does each RadTab not have an ID property?
  2. Kate
    Kate avatar
    1898 posts

    Posted 27 Jan 2012 Link to this post

    Hello Robert,

    Instead of the Text property you can use the Value property of the tabs and assign a unique value to each one of them. Thus you can use the FindTabByValue property to access them later.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top