Esempio n. 1
0
        /// <include file='doc\ObjectList.uex' path='docs/doc[@for="ObjectList.SelectListItem"]/*' />
        public bool SelectListItem(int itemIndex, bool selectMore)
        {
            EnsureItemLoaded (itemIndex);
            int itemCollIndex = TranslateVirtualItemIndex(itemIndex);

            ObjectListSelectEventArgs args = new ObjectListSelectEventArgs(
                                                        Items[itemCollIndex], 
                                                        selectMore);
            SelectedIndex = itemIndex;
            OnItemSelect(args);
            return args.UseDefaultHandling;
        }
Esempio n. 2
0
 /// <include file='doc\ObjectList.uex' path='docs/doc[@for="ObjectList.OnItemSelect"]/*' />
 protected virtual void OnItemSelect(ObjectListSelectEventArgs e) 
 {
     ObjectListSelectEventHandler onItemSelectHandler = (ObjectListSelectEventHandler)Events[EventItemSelect];
     if (onItemSelectHandler != null)
     {
         onItemSelectHandler(this, e);
     }
 }