Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnProcessUnboundColumnData(object sender, GridColumnDataEventArgs e)
- {
- IList itemsSource = (ItemsSource as IList);
- if (itemsSource == null) return;
- VerticalRowData row = Rows[e.ListSourceRowIndex];
- object item = itemsSource[Convert.ToInt32(e.Column.FieldName)];
- PropertyInfo itemProperty = item.GetType().GetProperty(row.RowName);
- if (itemProperty == null) return;
- if (e.IsGetData)
- {
- e.Value = itemProperty.GetValue(item, **null** );//!второй параметр вроде как необязательный, но без дописанного (,null) не работает
- }
- if (e.IsSetData)
- {
- itemProperty.SetValue(item, e.Value, **null** );//!третий параметр вроде как необязательный, но без дописанного (,,null) не работает
- }
- }
Add Comment
Please, Sign In to add comment