示例#1
0
        private void OnLayoutViewCustomFieldValueStyle(object sender, LayoutViewFieldValueStyleEventArgs e)
        {
            LayoutView view        = (LayoutView)sender;
            int        sourceIndex = view.GetDataSourceRowIndex(e.RowHandle);
            string     key         = string.Format("{0}|{1}", sourceIndex, e.Column.FieldName);

            e.Appearance.Font = cache.ContainsKey(key) ? modified : regular;
        }
示例#2
0
        public override IList GetSelectedObjects()
        {
            if (layoutView == null || DataSource == null)
            {
                return new object[0] {
                }
            }
            ;

            int[] selection = layoutView.GetSelectedRows();

            List <object> result = new List <object>();

            for (int i = 0; i < selection.Length; i++)
            {
                if (layoutView.IsDataRow(selection[i]))
                {
                    result.Add(((IList)DataSource)[layoutView.GetDataSourceRowIndex(selection[i])]);
                }
            }
            return(result);
        }