コード例 #1
0
        void iconSelector_OnIconSelection(object sender, OnIconSelectionEventArgs e)
        {
            OnSmartIconSelectionEventArgs ee = new OnSmartIconSelectionEventArgs(e.ImageList, e.ImageIndex, nowDrawingCellInfo, false);

            View.RaiseOnSmartIconSelection(ee);
            e.ImageIndex = ee.ImageIndex;
        }
        protected internal virtual void RaiseOnSmartIconSelection(OnSmartIconSelectionEventArgs e)
        {
            OnSmartIconSelectionEventHandler handler = (OnSmartIconSelectionEventHandler)Events[_onSmartIconSelection];

            if (handler != null)
            {
                handler(this, e);
            }
        }
 private void customGridView1_OnSmartIconSelection(object sender, OnSmartIconSelectionEventArgs e)
 {
     if (e.CellInfo.Column.FieldName == "ContactName")
     {
         if (e.IsActiveEditor)
         {
             e.ImageIndex = 0;
         }
         else
         {
             e.ImageIndex = 1;
         }
     }
     if (e.CellInfo.Column.FieldName == "City")
     {
         if (e.IsActiveEditor)
         {
             e.ImageIndex = 2;
         }
         else
         {
             e.ImageIndex = 3;
         }
     }
     if (e.CellInfo.Column.FieldName == "Country")
     {
         if (e.IsActiveEditor)
         {
             e.ImageIndex = 4;
         }
         else
         {
             e.ImageIndex = 5;
         }
     }
 }