0

I have a Class that contains: A DataGrid, A Pager

I am trying to make User Control that contains both of them and have all property that links to both of them.

So something:

public class MyGridViewPager : ltcGrid
    {
        public GridView aGridView;
        public DataPager aDataPager;
        public bool AutoGenerateColumns { 
           get { return this.aGridView.AutoGenerateColumns; } 
           set { this.aGridView.AutoGenerateColumns = value; } }

}

So I can use the property from them in my MyGridViewPager UserControl and in case of any choice change on the GridView or DataPager I can modify only the layer...or is it called wrapper-class? Not so sure about the naming...

But... how do I do the same thing for EventHandler? I can see it defines in:

public delegate void SelectionChangedEventHandler(object sender, SelectionChangedEventArgs e);

How can I expose this handler from my user control?

Note: I don't really want to do MyGridViewPager.aGridView.SelectionChangedEventArgs.

Cœur
  • 37,241
  • 25
  • 195
  • 267
King
  • 183
  • 1
  • 3
  • 13

1 Answers1

0

There is a myriad of ways to do this:

Community
  • 1
  • 1
Prisoner ZERO
  • 13,848
  • 21
  • 92
  • 137