Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataTable columns visible at design time

Status
Not open for further replies.

alanmusician

Programmer
Jun 30, 2005
17
US
I have a data source which is declared like so:
Code:
public class KPDataTable : IBindingList, ITypedList

It is (sort of) shadowing a data table called floating table like so:
Code:
        public object this[int index]
        {
            get
            {
                if (index >= this._totalRows)
                {
                    throw new ArgumentOutOfRangeException("index", index, "Invalid index");
                }

                return (this._floatingTable.Rows[index]);
            }
            set
            {
                throw new NotSupportedException();
            }


        }
This is done for paging and a few other things, and works great as a datasource of a bindingsource set at runtime.

I have a class called DocketBrowseTable that inherits from KPDataTable that sets up the datatable from a stored procedure. Again this works great at runtime like so:
Code:
            browseSource = new DocketBrowseTable();
            uxDefaultSource.DataSource = browseSource;

What I want to be able to do is set the datasource of a bindingsource in the designer to DocketBrowseTable. This would get columns for grids, etc. I would like to know what I need to add to my DocketBrowseTable class or my KPDataTable class to get this working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top