コード例 #1
0
        public InplaceDataNavigatorHelper(BarEditItem barItem)
        {
            owner = barItem;

            repo = owner.Edit as RepositoryItemInplaceDataNavigator;
            repo.EditNavigator.PositionChanged += EditNavigator_PositionChanged;
        }
 public override void Assign(RepositoryItem item)
 {
     BeginUpdate();
     try
     {
         base.Assign(item);
         RepositoryItemInplaceDataNavigator source = item as RepositoryItemInplaceDataNavigator;
         if (source == null)
         {
             return;
         }
         EditNavigator.DataSource = source.EditNavigator.DataSource;
     }
     finally
     {
         EndUpdate();
     }
 }
        public Form1()
        {
            InitializeComponent();

            dt = new DataTable();
            dt.Columns.Add("Column", typeof(string));
            dt.Rows.Add("String 1");
            dt.Rows.Add("String 2");
            dt.Rows.Add("String 3");

            bs.DataSource           = dt;
            gridControl1.DataSource = bs;

            RepositoryItemInplaceDataNavigator repo = barEditItem1.Edit as RepositoryItemInplaceDataNavigator;

            repo.EditNavigator.DataSource = bs;

            InplaceDataNavigatorHelper dnHelper = new InplaceDataNavigatorHelper(barEditItem1);  //This helper class is required to refresh bar edit item when position changes
        }
 static InplaceDataNavigator()
 {
     RepositoryItemInplaceDataNavigator.Register();
 }