Inheriting/Expanding the DataGrid
-
I'm trying to expand the datagrid's functionality to meet my needs. But I'm also fairly new to .NET (I've done alot of ASP/VB/Perl/PHP/PB, etc programming, just not .NET) Anyhow, what I'd like to be able to do is make my own control, using the datagrid as the foundation. Incorporating different column controls (namely drop downs), and some other standard features like sorting/filtering, etc. My biggest concern, beyond how to use a combo box for a field, is how I can bind that combo box, to the proper lookup table for the id that should be stored in that field. Meaning. I fill my data grid with data from a query something like: "SELECT FirstName, LastName, CityID FROM People" How I can make the 3rd column a drop down combo box, bind it's source to be "SELECT CityId, Name FROM Cities" and have it show just the Cities.Name, but when I save the modifications to the grid, it stores the Cities.CityID in the People table. Does that make sense? While alot of that 'could' be done in code I'd like to have some form of design time editor for this extended datagrid control. A way to give the developer a simpler interface to allow all of this. I'm sure it's possible, but I don't have a clue where to begin. Thanks for the help, --Gibbs