This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


How to use FindControlInCollection for auto complete box items
Last Post 31 Dec 1899 04:00 PM by . 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ChielusUser is Offline
New Member
New Member
Send Private Message
Posts:1
Avatar

--
30 Jul 2013 06:52 PM
     Hi all,

    I have a auto-complete box with 2 columns (an icon and a description).
    I want to dynamically set a tooltip for the icon. How can I do this?

    In a datagrid, this is easy by using the Loaded event and the FindControlInCollection method:
    partial void UsersByFilter_Loaded(bool succeeded)
            {
                if (succeeded)
                {
                    foreach (var user in this.IDMUsersByFilter)
                    {
                        this.FindControlInCollection(_controlUserTypeIconOfPersonA, user).Description =
                            user.UserType.Description;
                    }
                }
            }

    However, the same code block doesn't work when having a auto-complete box with the choices set to this query, error "The control 'Icon' is not inside a collection. You need to use FindControl."

    Using FindControl is no option either, the control is inside a collection...

    Thanks for helping me out,
    Chielus
    You are not authorized to post a reply.


    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation